setting scientific number notation on colorbar

Hi Guys,

I’m breaking my head how to use scientific numbering on color bar:

I use the following code to plot data from multiple files, would be great if someone could direct me, becuase the numbers I have are 0.0013 et. and what ever I do, the number just go over each other:

for i in xrange(len(data)):
x,z,som=data[i][“x”],data[i][“z”],data[i][‘ch2o’]
som=somMwSOM
som=som
1000
x=N.unique(x)
z=N.unique(z)
p_w=N.unique(som)

fig = plt.figure(len(data)+1+i)
ax1 = fig.add_subplot(111)
som=resize(som,(z.size,x.size))
v=N.arange(1.15,1.18,0.002)
CS=contourf(x,z,som,cmap=cm.pink_r)
cb=colorbar(CS, orientation='horizontal', shrink=1.0,aspect=33)

ax1.set_title("SOM "+titles[i])
savefig('Fig'+str(i)+'.png')

Thanks in advance !

···


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