- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Rishikesh Kumar Rishi has Published 1162 Articles
Rishikesh Kumar Rishi
2K+ Views
To plot a bar chart with multiple labels in Matplotlib, we can take the following steps −Make some data set for men_means, men_std, women_means, and women_std.Make index data points using numpy.Initialize the width of the bars.Use subplots() method to create a figure and a set of subplots.Create rects1 and rects2 ... Read More
Rishikesh Kumar Rishi
3K+ Views
To rotate axes label text in 3D matplotlib, we can use set_zlabel() method with rotation in the method's argument.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Add a subplot to the current axis with projection="3d".Initialize ... Read More
Rishikesh Kumar Rishi
8K+ Views
To draw multiple legends on the same axes in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplotsPlot lines using two lists with different labels, linewidth and linestyle.Place the first legend at the upper-right location.Add artist, i.e., first legend ... Read More
Rishikesh Kumar Rishi
2K+ Views
The best way to plot an angle between two lines in Matplotlib is to use the Arc class to make an angle arc to plot the angle in between.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using ... Read More
Rishikesh Kumar Rishi
3K+ Views
To display percentage above a bar chart in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x and y data points; initialize a variable, width.Create a figure and a set of subplots using subplots() method.Add bars with x ... Read More
Rishikesh Kumar Rishi
986 Views
To make two markers share the same label in the legend using Matplotlib, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y(as a sin(x) and cos(x)), using plot() method.Place legend with ... Read More
Rishikesh Kumar Rishi
838 Views
To manipulate on horizontal space in Matplotlib subplots, we can use wspace=1 in subplots_adjust() method without tight plot layout.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Create a figure and a set of subplots with 4 indices.To adjust the ... Read More
Rishikesh Kumar Rishi
653 Views
o get the list of font family in Matplotlib, we can take the following steps −Iterate fonts manager ttflist and print the names.Iterate fonts manager afmlist and print the names.Exampleimport matplotlib.font_manager as fm for f in fm.fontManager.ttflist: print(f.name) for f in fm.fontManager.afmlist: print(f.name)OutputSTIXNonUnicode STIXGeneral STIXSizeFiveSym cmr10 ... ... ... Read More
Rishikesh Kumar Rishi
497 Views
To pass parameters to on_key in fig.canvas.mpl_connect('key_press_event', on_key), we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a figure and a set of subplots.Set x and y scale of the axes.Bind the function to the event.To display the figure, use ... Read More
Rishikesh Kumar Rishi
356 Views
To customizing annotation with seaborn's face grid, we can take following steps −Set the figure size and adjust the padding between and around the subplots.Create a data frame with col1 and col2 columns.Multi-plot grid for plotting conditional relationships.Apply a plotting function to each facet's subset of the data.Set the title ... Read More