Matplotlib logarithmic scatter plot
John Hunter
jdhunter at ace.bsd.uchicago.edu
Mon Feb 27 18:26:50 EST 2006
>>>>> "Derek" == Derek Basch <dbasch at yahoo.com> 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), rand(1000))
Out[34]: <matplotlib.collections.RegularPolyCollection instance at
0x9c32fac>
In [35]: ax.set_xscale('log')
In [36]: ax.set_xlim(1e-6,1e6)
Out[36]: (9.9999999999999995e-07, 1000000.0)
In [37]: draw()
More information about the Python-list
mailing list