From: Todamont <re...@un...> - 2013-01-27 03:16:22
|
I'm charting financial data, so scientific notation is unwanted in ALL cases. Sometimes if I pass it data with just a few trades right near each other, it scales so the y-axis get set to some bizare exponent, like 1.7321e1. By the way, why would anyone ever want a plot in scientific notation where the exponent is not a power of 10? It makes absolutely no sense whatsoever that it would do that, it is a bug. So, here is the code I'm trying to use to force matplotlib to NOT use scientific notation on the y-axis, unsuccesfully: formatter = ScalarFormatter() formatter.set_scientific(False) formatter.set_powerlimits((-10000,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([ -10000, 10000]) None of these attempts to turn off scientific notation is working. Any suggestions? Please? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320.html Sent from the matplotlib - users mailing list archive at Nabble.com. |