On 24 March 2010 17:33, Nils Wagner <nwag...@iam.uni-stuttgart.de> wrote:
> Hi all,
>
> how can I change the output format of yticks from 1000000
> to 1.e6 ?

I'm not sure if there's an easier way still, but this works:

from matplotlib.ticker import Formatter
class SciFormatter(Formatter):
    def __call__(self, x, pos=None):
        return "%0.2e" % x

ax = plt.gca()
ax.yaxis.set_major_formatter(SciFormatter())
plt.draw()

Angus.
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to