Good tip John. Hopefully it will help someone out. Thanks again.
Derek Basch
--
http://mail.python.org/mailman/listinfo/python-list
> "Derek" == Derek Basch <[EMAIL PROTECTED]> writes:
Derek> formatter = FuncFormatter(log_10_product)
Derek> ax.xaxis.set_major_formatter(formatter)
Derek> ax.yaxis.set_major_formatter(formatter)
I would caution you against using identical objects for the x and y
axis *Locators*.
Thanks again. Here is the finished product. Maybe it will help someone
in the future:
from pylab import *
def log_10_product(x, pos):
"""The two args are the value and tick position.
Label ticks with the product of the exponentiation"""
return '%1i' % (x)
ax = subplot(111)
# Axis sca
> "Derek" == Derek Basch <[EMAIL PROTECTED]> writes:
Derek> Great! That worked fine after I played with it for a
Derek> bit. One last question though. How do I label the ticks
Derek> with the product of the exponentiation? For instance:
Derek> 100
Derek> instead of
D
Great! That worked fine after I played with it for a bit. One last
question though. How do I label the ticks with the product of the
exponentiation? For instance:
100
instead of
10**2
Thanks for all the help,
Derek Basch
--
http://mail.python.org/mailman/listinfo/python-list
> "Derek" == Derek Basch <[EMAIL PROTECTED]> writes:
Derek> Thanks for the reply. I need a scatter plot though. Can
Derek> that be done?
You can set the scale of xaxis and yaxis to either log or linear for
scatter plots
In [33]: ax = subplot(111)
In [34]: ax.scatter( 1e6*rand(1000),
Thanks for the reply. I need a scatter plot though. Can that be done?
--
http://mail.python.org/mailman/listinfo/python-list
Try this, don't know if this works for al versions:
from pylab import *
x=10**linspace(0,5,100)
y=1/(1+x/1000)
loglog(x,y)
show()
If you only need a logarithm along one axis you can use semilogx() or
semilogy(). For more detailed questions go to the matplotlib mailing
list.
Cheers,
Bas
--
http