Hello,

I execute the following code:

try:
        from math import *
        import pylab as p
except:
        print "Couldn't import all dependent libraries"
        sys.exit()
dataLength = 100
data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)]
p.plot(data)
p.show()


This produces a figure window. When I zoom in regions of the plot, the
xticks change correctly to the zoomed region.

This is in contrast to the effect of the following code:

try:
        from math import *
        import pylab as p
except:
        print "Couldn't import all dependent libraries"
        sys.exit()
dataLength = 100
data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)]
p.plot(data)
newXTicks= [str(x/2.0) for x in p.xticks()[0]]
p.xticks(p.xticks()[0], newXTicks)
p.show()

This code produces tick marks [0, 10, 20, 30, 40, 50]. However when
zooming, the xtick marks do not adjust correctly to the zoomed
regions.


Your help on this issue would be great, thanks!

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to