[Matplotlib-users] How do you use ticklabel_format?
Hello, I'm trying to make a simple plot that doesn't use scientific notation for the x axis since the axise only goes from 1 to 1600. I tried using ticklabel_format like this: from pylab import * l, cltt = loadtxt('ABF_20_20.dat',unpack=True) semilogx(l, cltt) xlim(1,1600) ax = gca() ax.ticklabel_format(style='plain',axis='x') show() I get this error This method only works with the ScalarFormatter. which seems to be the error refered to in the documentation. However, I'm not sure how to fix the problem? Is there way to use this ScalarFormatter some how? Did I code it wrong? If anyone knows how to get the xaxis to not display scientific notation this would be helpful. Thanks. Joseph Smidt -- Joseph Smidt josephsm...@gmail.com Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you use ticklabel_format?
Joseph Smidt wrote: Hello, I'm trying to make a simple plot that doesn't use scientific notation for the x axis ... Is there way to use this ScalarFormatter some how? ... does this help? from pylab import * a = arange(1600) plot(a,a) xscale('log') from matplotlib.ticker import ScalarFormatter ax = gca().xaxis ax.set_major_formatter(ScalarFormatter()) best, sebastian. signature.asc Description: OpenPGP digital signature -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you use ticklabel_format?
Sebastian, Thanks, your hint worked. On Wed, Feb 3, 2010 at 1:54 PM, Sebastian Busch webmas...@thamnos.de wrote: Joseph Smidt wrote: Hello, I'm trying to make a simple plot that doesn't use scientific notation for the x axis ... Is there way to use this ScalarFormatter some how? ... does this help? from pylab import * a = arange(1600) plot(a,a) xscale('log') from matplotlib.ticker import ScalarFormatter ax = gca().xaxis ax.set_major_formatter(ScalarFormatter()) best, sebastian. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Joseph Smidt josephsm...@gmail.com Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users