- 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
How to change the order of plots in Pandas hist command?
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.
Example
from matplotlib import pyplot as plt import pandas as pd plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True df = pd.DataFrame({'a': [1, 1, 1, 1, 3], 'b': [1, 1, 2, 1, 3], 'c': [2, 2, 2, 1, 3], }) df.hist() df[['c']].hist() df[['a']].hist() df[['b']].hist() plt.show()
Output
- Related Articles
- How to change the order of Pandas DataFrame columns?
- How to change the size of plots arranged using grid.arrange in R?
- How to change the Title of the console using PowerShell command?
- How to change order of items in MySQL?
- How to change the JOIN order in Oracle?
- How do I change the font size of the scale in Matplotlib plots?
- How to change the datetime tick label frequency for Matplotlib plots?
- MySQL command to order timestamp values in ascending order?
- How to change the color of the PowerShell ISE editor using command?
- How to change the order of bars in bar chart in R?
- How to change the order of elements in a list in R?
- How to change the order of a matrix in increasing order based on a single column?
- How to change the order of columns in an R data frame?
- How to change the DPI of a Pandas Dataframe Plot in Matplotlib?
- Purpose of using CHANGE command in MySQL?

Advertisements