Matplotlib logarithmic scatter plot
John Hunter
jdhunter at ace.bsd.uchicago.edu
Wed Mar 1 14:59:26 EST 2006
>>>>> "Derek" == Derek Basch <dbasch at yahoo.com> 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*. For the formatters, it will do no harm, but for the
locators you can get screwed up because the locator object reads the
axis data and view limits when making it's choices.
Ie, do not do this:
ax.xaxis.set_major_locator(locator)
ax.yaxis.set_major_locator(locator)
but rather do this
ax.xaxis.set_major_locator(MyLocator())
ax.yaxis.set_major_locator(Mylocator())
Thanks for the example,
JDH
More information about the Python-list
mailing list