- 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](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To export to PDF a graph based on a Pandas dataframe, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a Pandas dataframe with three columns, col1, col2 and col3.Plot the dataframe using plot() method.To display the figure, use show() ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To change the autopct text color to be white in a pie chart in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a list of hours, activities, and colors to plot pie chart.Make a list of '.Text' instances ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
281 Views
To change the size of a plot in xgboost.plot_importance, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Load the data from a csv file.Get x and y data from the loaded dataset.Get the xgboost.XGBCClassifier.feature_importances_ model instance.Fit x and y data ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
271 Views
To add third level of ticks in Python Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create t and s data points using numpy.Create a figure and a set of subplots.Plot t and s using plot() method.Create a twin ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
456 Views
To plot hysteresis threshold in Matplotlib, 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.Load some greek coins, Greek coins from Pompeii.Find, high, low, and edges of the images using the sobel filter.Apply ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To make semilogx and semilogy plots, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.create a new figure or activate an existing figure.Scatter and plot x and y data points.Make a plot with log scaling on the X axis.Make a ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
600 Views
To programmatically stop interaction for specific figures in Jupyter notebook, we can use plt.off() to stop any interaction after that.Execute the following commnads sequentially −%matplotlib autoimport matplotlib.pyplot as pltplt.rcParams["figure.figsize"] = [7.50, 3.50]plt.rcParams["figure.autolayout"] = TrueCreate a figure and a set of subplots.Plot the line on the axis (From step 5).Turn off ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To animate 3D plot_surface in Matplotlib, we can take the following steps−Initialize variables for number of mesh grids (N), frequency per second (fps) to call a function, and frame numbers (frn).Create x, y and z array for a curve.Make a function to make a z-array using lambda function.To pass a ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To combine several matplotlib axes subplots into one figure, we can use subplots() method with nrow=2.StepsSet the figure size and adjust the padding between and around the subplots.Create x, y1 and y2 data points using numpy.Create a figure and a set of subplots.Plot x, y1 and y2 data points using ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
877 Views
To get xkcd font working, we can use plt.xkcd() to turn on sketch-style drawing mode.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Use plt.xkcd() to turn on sketch-style drawing mode.Create a new figure or activate an existing figure.Add an ... Read More