Re: Matplotlib logarithmic scatter plot

2006-03-01 Thread Derek Basch
Good tip John. Hopefully it will help someone out. Thanks again. Derek Basch -- http://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib logarithmic scatter plot

2006-03-01 Thread John Hunter
> "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*.

Re: Matplotlib logarithmic scatter plot

2006-02-28 Thread Derek Basch
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

Re: Matplotlib logarithmic scatter plot

2006-02-28 Thread John Hunter
> "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

Re: Matplotlib logarithmic scatter plot

2006-02-27 Thread Derek Basch
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

Re: Matplotlib logarithmic scatter plot

2006-02-27 Thread John Hunter
> "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),

Re: Matplotlib logarithmic scatter plot

2006-02-27 Thread Derek Basch
Thanks for the reply. I need a scatter plot though. Can that be done? -- http://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib logarithmic scatter plot

2006-02-27 Thread Bas
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

Matplotlib logarithmic scatter plot

2006-02-27 Thread Derek Basch
Can anyone give any suggestions on how to make a logarithmic (base 10) x and y axis (loglog) plot in matplotlib? The scatter function doesn't seem to have any log functionality built into it. Thanks, Derek Basch P.S. I suck at math so feel free to make me feel stupid if it is really easy to do :)