Considers the simple data frame below:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'var3':[1,3,9,6,1,6,3,1,1,3],
'var1':[9,1,2,6,6,5,9,3,1,7],
'var2':[6,6,2,9,8,3,5,4,1,3]})
df
Now, let's plot a set of histograms from this data:
df.hist(layout=(1,3))
plt.show()
Note that the order (from left to right) of the histograms in the figure is different from the order of the columns in the data frame. How to make the histograms obey the order of its data source?



