Hi David,

I found this one::

xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )

On the page

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.xticks

If I had that problem I would try to do something like that:

xvalues = linspace(0,100,1000)

xticks(xvalues, ["%.2f" % val for val in xvalues])

# or, with a lambda expression, but in #python they say 
# a list comprehension is better (faster)

xticks(xvalues, map(lambda i : "%.2f" % i, xvalues))

The side effect is, of course, that the tick is not exactly at the position he 
indicates. Maybe you better use "arange()" to get the right values for your 
ticks, just make sure that they cover the interval your xvalues are in.

If you find a better solution, please let me know.

Best regards,
Philipp

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to