Hi,

I'm trying to generate a contour plot with logarithmic axes. I'm
generating data on a grid defined by logspaces:

x_range = logspace(log10(xstart),log10(xend),num=25)
y_range = logspace(log10(ystart),log10(yend),num=25)

Then, to generate the plot I do the following:

[X,Y]=pylab.meshgrid(log10(x_range),log10(y_range))
pylab.contourf(X,Y,transpose(data))

And to obtain nicer tick mark labels, this dirty way:

xmajorForm = pylab.FormatStrFormatter('10e%.1f')
ax.xaxis.set_major_formatter(xmajorForm)
ymajorForm = pylab.FormatStrFormatter('10e%.1f')
ax.yaxis.set_major_formatter(ymajorForm)

Are there better ways to (1) set the x and y xis scaling to
logarithmic, and to (2) obtain nicely formatted tick mark labels ?

I tried playing around with the x and y axis data and with LogLocator
and LogFormatter but it doesn't seem to do the job.

Pieter

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to