How to use different axis scales in pandas' DataFrame.plot.hist?

Viewed 3063

I find DataFrame.plot.hist to be amazingly convenient, but I cannot find a solution in this case.

I want to plot the distribution of many columns in the dataset. The problem is that pandas retains the same scale on all x axes, rendering most of the plots useless. Here is the code I'm using:

X.plot.hist(subplots=True, layout=(13, 6), figsize=(20, 45), bins=50, sharey=False, sharex=False)
plt.show()

And here's a section of the result: plots

It appears that the issue is that pandas uses the same bins on all the columns, irrespectively of their values. Is there a convenient solution in pandas or am I forced to do it by hand?

I centered the data (zero mean and unit variance) and the result improved a little, but it's still not acceptable.

1 Answers
Related