0

I was plotting some financial charts using matplotlib when I realized if the limit of the y-axis was set to a pretty large number(say 1e8),then matplotlib will automatically put a notifier at the upper-left corner of the axes saying the scale of the y axis is 1e8:

fig= pyplot.figure()
ax= fig.add_subplot(111)
ax.set_ylim(0.0, 100000000.0)
ax.plot((0.0, 1.0), (50000000.0, 50000000.0))
pyplot.show()

Now I really don't need the notifier there, I've tried the following means to remove it:

for tik in ax.get_yticklabels(minor=False):
    tik.set_visible(False)
for tik in ax.get_yticklabels(minor=True):
    tik.set_visible(False)

but it didn't work, seems the notifier has nothing to do with the tickers, anyone knows how to make it not to show up? Besides, if you have really good insight of matplotlib I'd also like to know does matplotlib have to scale down the y axis because the limit was set too high? Will it be a good idea to scale down the original plotting data first (which involves many large numbers) before plotting them? Thanks ~

Jacky Liu
  • 45
  • 6
  • Yeah, points me right to the place. Tried the recipe, mysteriously set_useOffset(False) didn't work for me, but set_scientific(False) did :) Thanks a lot ~ – Jacky Liu Dec 13 '13 at 21:48
  • also see: http://stackoverflow.com/questions/14711655/how-to-prevent-numbers-being-changed-to-exponential-form-in-python-matplotlib-fi/14711866#14711866 – tacaswell Dec 14 '13 at 03:49

0 Answers0