- 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
6K+ Views
To plot only a table, we can take the following steps−Create fig and axs, using subplots. Create a figure and a set of subplots.Create random data for 10 rows and 3 columns.Create a tuple for columns name.axis('tight') − Set the limits, just large enough to show all the data, then ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To add different graphs (as an inset) in another Python graph, we can take the following steps −Create x and y data points using numpy.Using subplots() method, create a figure and a set of subplots, i.e., fig and ax.To create a new axis, add axis to the existing figure (Step 2).Plot x and y on the ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
361 Views
To change order of plots in Pandas hist commad, we can take the following steps −Make a data frame using Pandas.Plot a histogram with the data frame.Plot the data frame in different order.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt import pandas as pd plt.rcParams["figure.figsize"] = [7.50, 3.50] ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To add vertical lines to a distribution plot, we can take the following steps−Create a list of numbers.Create an axis using sns.displot().Get x and y data of the axis ax.Plot a vertical line on the plot.Remove the line at the 0th index.To display the figure, use show() method.Exampleimport seaborn as ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
7K+ Views
To draw a log-normalized imshow() plot with a colorbar representing the raw data in matplotlib, we can take the following steps −Create a 2D array using numpy.Display the data as an image, i.e., on a 2D regular raster, using imshow() methodCreate a colorbar for a ScalarMappable instance, *mappable*, using imshow() ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To plot circular (polar) histogram in Python, we can take the following steps−Create data points for theta, radii and width using numpy.Add a subplot to the current figure, where projection='polar' and nrows=1, ncols=1 and index=1.. Make a bar plot using bar() method, with theta, radii and width data pointsIterate radii ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To put text outside a plot, we can change the text position by changing the value of text_pos_x and text_pos_yStepsCreate data points for x and y.Initialize the text position of x and y.To plot x and y, use plot() method with color='red'.Use text() method to add text to figure.To display ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
3K+ Views
To adjust gridlines and ticks in matplotlib imshow(), we can take the following steps−Create data, a 2D array, using numpy.Using imshow() method, display data as an image.Set xticks and yticks using set_xticks and set_yticks method.To set the xticklabels and yticklabels, use set_xticklabels and set_yticklabels method.Lay out a grid in current ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
13K+ Views
To plot lines with colors through colormap, we can take the following steps−Create x and y data points using numpyPlot x and y data points using plot() method.Count n finds, number of color lines has to be plotted.Iterate in a range (n) and plot the lines.Limit the x ticks range.Use ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
853 Views
To make grouped labels for bar charts, we can take the following steps −Create lists for labels, men_means and women_means with different data elements.Return evenly spaced values within a given interval, using numpy.arrange() method.Set the width variable, i.e., width=0.35.Create fig and ax variables using subplots method, where default nrows and ncols are 1.The ... Read More