Hi John, The image is correct when plotted using
> i=imread('plot.png') then imshow(i), but I want to add
> axes. I generated the image directly using GTK commands,
> then saved the pixbuf as png. The pixels in the image
> correspond to sample points in both x- and y-directions
> generated using exp(linspace(log(low),log(high),num). Why is
> there no logspace in matplotlib, btw?
I'll be happy to add it -- how about sending a version?
> All I basically need is a way to say what the range and
> distribution of the pixels is: I don't want the axes to
> default to integer-numbered linear-spaced values as they
> currently do.
> I tried to see if I could use the set_xscale command but it
> seems to be internal and/or only applicable to polar plots?
setting the xscale and yscale to 'log' should work fine, as long as
you make sure the xaxis and yaxis do not contain nonpositive limits.
For an MxN image, the default limits are 0..N-1 and 0..M-1 and the 0
will break the log transform. You can work around this by setting the
from pylab import figure, show, nx
fig = figure()
ax = fig.add_subplot(111)
im = nx.mlab.rand(500,500)
Hope this helps,