On 7/25/11 12:29 PM, Dox wrote:
Hi again.

I've seen the documentation for plot. However, the last of the points I
highlight seems to be not possible.

It is, but you have to follow the pointers in the documentation to the further documentation in matplotlib. In the Sage documentation for tick_formatters, it says:

        - ``tick_formatter`` - A matplotlib formatter for the major
          ticks. There are several options.  For more information about
          formatters, type ``from matplotlib import ticker`` and then
          ``ticker?``.

Doing that shows a number of formatters that you can use to format labels for the ticks. One of those is an IndexFormatter, where you give it a list of strings. Here is an example:



plot(x^2,(x,.9,5), ticks=[[1,2,3,4],[]],tick_formatter=ticker.IndexFormatter([0,'eta','rho','my','new']))

See the matplotlib ticker documentation for more possibilities:

http://matplotlib.sourceforge.net/api/ticker_api.html#tick-formatting

Thanks,

Jason


--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to