From: Johan G. <joh...@gm...> - 2009-11-29 09:09:28
|
Wayne Watson skrev: > See Subject. I don't seem able to produce a simple example of using > histogram that uses range. I tried a variety of ranges, range=(0,22), > range=(0, 50.2), ... and I see no difference between any of the x values > scale. Can someone provide an example that shows how it works? > The script below works for me. It produces two files with different limits on the x-axis and corresponding histograms. ------------ import matplotlib.pyplot as plt fig = plt.figure() plt.hist([1, 2, 3, 4, 5], range=(0, 20)) plt.savefig("hist_0_20.png") plt.close(fig) fig = plt.figure() plt.hist([1, 2, 3, 4, 5], range=(0, 8)) plt.savefig("hist_0_8.png") plt.close(fig) ------------- Hope it helps / johan |