I've been having difficulties with axis limit control. From a bigger application I've reduced an example down to the following short code segment. Note, the commented-out line, #x = numpy.linspace(98.42, 99.21, 100), line in which the example works OKAY.

What is annoying is that the following example will produce a graph in which the x-axis is labeled at ticks starting at 0.1 going to 0.35 (times 1.474e2 !) Instead, I am expecting an axis from 147.63 to 148.31. Note that if you swap out the x with the commented-out line the example works like I would expect.

By the way, this example is with pylab. However, I've got the same problem using plt from matplotlib or anything matplotlib related.

===

import random

import numpy

import pylab

#x = numpy.linspace(98.42, 99.21, 100)

x = numpy.linspace(147.63, 148.31, 100)

y = numpy.random.random((len(x)))

pylab.plot(x, y)

pylab.xlim(numpy.min(x), numpy.min(x))

pylab.show()

--

--------------------

Jim A. Horning

jim@jimh.com