Why is it that when the code is run through python the graph seems to break down at 10^-1 on the y-axis?(Code below)
from pylab import *
bins = [+0.000e+00,+1.000e+00,+2.000e+00,+3.000e+00,+4.000e+00,+5.000e+00]
wght = [[+3.000e-02,+7.0e-02,+3.0e-01,+5.0e-01,+8.0e-01]]
hist([ bins[:-1] for i in range(len(wght)) ], bins=bins, weights=wght,histtype="stepfilled", log=True )
ylim(bottom=0.01); ylim(top=1.0)
savefig("./output.pdf")
What it should look like:
What it actually looks like:
I am currently running python 2.7 on Xubuntu 14.04, and this error happens on many histograms. For some reason when opened and run through Python(x,y) on Windows we get the first histogram(What it should look like) but when I move onto python on Xubuntu all the graphs I try to run similar to this one all have issues at the 10^-1 on the y-axis.(What it actually looks like) What can I do with this code to make sure it outputs the first gyazo picture on any python version I want to run?
This behaviour is present in older versions, installing a new version is recommended.
The output was as excepted with python 2.7 and matplotlib 1.4.2 (debian / jessie), but not with python 2.7 and matplotlib 1.3.1 (xubuntu 14.04 / trusty).
The version of the matplotlib can be checked with
python -c 'import matplotlib; print(matplotlib.__version__)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With