Hi Every, Hi Ryan
I finally solved this issue, which bothered me very long.
I managed to make a nicer scientific formatting on the xticks !
from pylab import *
import numpy as N
from matplotlib.ticker import Formatter,FuncFormatter
import os
#class to produce scientific format numbering
class SciFormatter(Formatter):
def __call__(self, x, pos=None):
return "%1.e" % x
class NiceSciFormatter(Formatter):
def __call__(self, x, pos=None):
a="%1.1E" % x
a=a[:5]+a[-1]
return a
fig=figure()
ax=fig.add_subplot(111)
y=[.0001,.0002,.0003,.0004,.0005]
x=[1,2,3,4,5]
ax.plot(x,y)
ax.yaxis.set_major_formatter(NiceSciFormatter())
show()
Cheers ,
Oz
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Imagine all the people
Living life in peace
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users