This is the relevant code:

import sys, shutil
import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg
from mhd_scipy import load_mhd
from datetime import datetime
import matplotlib.dates as dates
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager
from matplotlib.ticker import ScalarFormatter, FormatStrFormatter,
FuncFormatter

...

   fig=Figure(figsize=(5.5,2.4))
   pl=fig.add_subplot(111)
  
pl.plot_date(zip(graphdate),zip(price),'-',color='white',lw='0.5',alpha=0.25)
   pl.set_ylim([min(price),max(price)])
   ax2=pl.twinx() 
   ax2.set_ylim([min(price),max(price)])

# here is my attempt to force NON-SCIENTIFIC axes
   formatter = ScalarFormatter()
   formatter.set_scientific(False)
   formatter.set_powerlimits((-1000000000,10000))
   pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
   pl.yaxis.set_major_formatter(formatter)
   pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
   pl.yaxis.set_minor_formatter(formatter)
   pl.set_autoscaley_on(False)
   yfm = pl.yaxis.get_major_formatter()
   yfm.set_powerlimits([ -100000000000, 10000])

#finally, render...
   canvas=FigureCanvasAgg(fig)   bigName = pyArgs[4] + "_big.png"   # create
image name string..
   canvas.print_figure(bigName,dpi=200)       # create date/timestamped file
   print "Large line-graph Created"


So, if I pass this thing price data that includes only 1 trade, or just a
few trades that are within a cent or two of each other, that's when the
bizarre axis scaling happens...






--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40322.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to