- 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
866 Views
To make several legend keys to the same entry in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Plot line1 and line2 using plot() method.Use legend() method to place a legend over the plot with numpoints=1To display the figure, ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To remove horizontal lines in an image, we can take the following steps −Read a local image.Convert the image from one color space to another.Apply a fixed-level threshold to each array element.Get a structuring element of the specified size and shape for morphological operations.Perform advanced morphological transformations.Find contours in a ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To specify the line width of the legend frame in Matplotlib, we can use set_linewidth() method.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 using subplots() method.Plot x and y using plot() ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
4K+ Views
To plot a Pandas multi-index data frame with all xticks, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create index value with 1000 smaples data.Make a one-dimensional ndarray with axis labels.Get the mean value of the series.Plot g dataframe.Set the ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
597 Views
We can save the current figure in the local machine and can display it.StepsSet the figure size and adjust the padding between and around the subplots.Create x data points using numpy.Plot x and y data points using plot() method.Save the figure using savefig() method.Exampleimport numpy as np import matplotlib.pyplot as ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
675 Views
To display real-time graphs in a simple UI for a Python program, we can animate the contour plot.StepsSet the figure size and adjust the padding between and around the subplots.Create a random data of shape 10×10 dimension.Create a figure and a set of subplots using subplots() method.Make an animation by ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To draw a line (i.e., arrow) outside of an axis, we can use annotate() method, 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.Clear the current figure.Add an '~.axes.Axes' to the figure as part of ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
743 Views
To use multiple font sizes in one label in Python, we can use fontsize in title() method.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y using plot() method.Initialize a variable, fontsize.Set the title of the plot ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To put the Origin at the center of the cos curve in a figure, 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 using numpy.Set the position of the axes using spines, top, left, right ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
746 Views
To draw an arrow-like linestyle in matplotlib, we can use quiver() method.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Use quiver() method to draw a line.To display the figure, use show() method.Exampleimport numpy as np import matplotlib.pyplot as plt ... Read More