- 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
199 Views
To make a simple 3D line with matplotlib, we can take the following steps −Create a new figure or activate an existing figure.Add axes to the figure as part of a subplot arrangement.Create data points for theta, z, r, x and y using numpy.Plot x, y and z using plot() method.Place ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
4K+ Views
To plot multiple histograms on same plot with Seaborn, we can take the following steps −Create two lists (x and y).Create a figure and add a set of two subplots.Iterate a list consisting of x and y.Plot a histogram with histplot() method using the data in the list (step 3).Limit ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
4K+ Views
To change the color of a plot frame, we can set axes ticklines and spine value into a specific color.StepsCreate a figure and add a set of subplots, using subplots method with value 4.Zip colors with axes and iterate them together.In the iteration, set the color for spines values and ticklines ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
238 Views
To insert statistical annotation, we can take the following steps −Create lists (x and y) of numbers.Using subplots() method, create a figure and a set of subplots.Using plot() method, plot the data that contains dates with linestyle "-.".Annotate a point in the plot using annotate() method, mean of x and y.To display ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
916 Views
To annotate time series plot in matplotlib, we can take the following steps −Create lists for time and numbers.Using subplots() method, create a figure and a set of subplots.Using plot_date() method, plot the data that contains dates with linestyle "-.".Annotate a point in the plot using annotate() method.Date ticklabels often overlap, so it ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To annotate data points while plotting from pandas data frame, we can take the following steps −Create df using DataFrame with x, y and index keys.Create a figure and a set of subplots using subplots() method.Plot a series of data frame using plot() method, kind='scatter', ax=ax, c='red' and marker='x'.To annotate the ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
9K+ Views
To fill color below a curve, we can take the following steps −StepsInitialize variable n. Initialize x and y data points using numpy.Create a figure and a set of subplots, fig and ax.Plot the curve using plot() method.Use fill_between() method to fill the area between the two curves, with -1 value.To display ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To plot a histogram from pre-counted data in matplotlib, we can take the following steps −Create a list of numbers.Make a pre-counted list with the help of input data.Plot a histogram with data, color=red, and label=data, using hist() method.Plot another histogram with counted data, color=default, and label=counted_data, using hist() method.To place ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To show an axes subplot in Python, we can use show() method. When multiple figures are created, then those images are displayed using show() method.StepsCreate x and y data points using numpy.Plot x and y using plot() method.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt import ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
958 Views
To change the color of the ticks in the colorbar in matplotlib, we can take the following steps−Create a random 2D−Array using numpy, with 4☓4 dimension.Use imshow() method to display the data as an image.Create a colorbar using colorbar() method with scalar mappable instance of imshow().Use getp() method to return ... Read More