- 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
978 Views
To annotate the point on a scatter plot with automatically placed arrows, we can take the following steps −Create points for x and y using numpy.Create labels using xpoints.Use scatter() method to scatter the points.Iterate labels, xpoints and ypoints and annotate plot with label, x and y with different properties.To display the ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To set a relative frequency in a matplotlib histogram, we can take the following steps −Create a list of numbers for data and bins.Compute the histogram of a set of data, using histogram() method.Get the hist and edges from the histogram.Find the frequency of the histogram.Make a bar with bins (step ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
13K+ Views
To plot a circle in matplotlib, we can take the following steps −Create a new figure or activate an existing figure using figure() method.Add a subplot arrangement to the current axis.Create a true circle at a center using Circle class.Add a patch to the current axis.Set limits of the x and y ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To add apha to an existing matplotlib colormap, we can take the following steps −Create data with a 4×4 dimension array using numpy.Get the colormap using plt.cm.RdBU.Create a new colormap using numpy.Set alpha value to the new colormap.Generate a colormap object using the list of colors.Create a new figure or ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To annotate a heatmap with text in matplotlib, we can take the following steps −Create random data with 4×4 dimension array.Create a pseudocolor plot with a non-regular rectangular grid, using pcolor() method.To put text in the pixels, we can use text() method.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
5K+ Views
To set the ticks on a fixed position in matplotlib, we can take the following steps −Create a figure and add a set of subplots.To set the ticks on a fixed position, create two lists with some values.Use set_yticks and set_xticks methods to set the ticks on the axes.To display ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To make superscript or subscript text in matplotlib, use LaTeX representation.StepsCreate x and y data points using numpy.Plot x and y data point using plot() method.Put the title with LateX representation using title() method.Use xlabel and ylabel methods to set the label of the axes.Exampleimport numpy as np from matplotlib import pyplot ... 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 spacing of dashes in a dashed line in matplotlib, we can take the following steps −Create data points x and y using numpy.Initialize two variables space and dash_len with value 3.Plot x and y using plot() method, with line style '--', dashes tuple stores the property of dashed ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To plot a step function with matplotlib in Python, we can take the following steps −Create data points for x and y.Make a step plot using step() method.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt import numpy as np plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True x = np.array([1, 3, ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
7K+ Views
To rotate xtick labels through 90 degrees, we can take the following steps −Make a list (x) of numbers.Add a subplot to the current figure.Set ticks on X-axis.Set xtick labels and use rotate=90 as the arguments in the method.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.00, ... Read More