On 1/28/11 7:20 AM, kcrisman wrote:


On Jan 28, 9:52 am, "D. S. McNeil"<dsm...@gmail.com>  wrote:
On Fri, Jan 28, 2011 at 9:08 PM, Jeff wrote:
I would like to be able to plot a function, e.g. plot(sin), that has
axes and ticks on the axes but that does not have labels for the
ticks. I understand that I might be able to do this using a ticker
formatter, perhaps also, by directly using matplotlib, but I do not
know exactly how to go about doing this.

There may be a simpler way, but:

import matplotlib

p = plot(sin)
p.show(tick_formatter=(matplotlib.ticker.NullFormatter(),
                        matplotlib.ticker.NullFormatter()))

worked for me.  The repetition is to make sure that both x and y tick
labels are turned off.


Yes, if you look at http://www.sagemath.org/doc/reference/sage/plot/plot.html
and search for tick_formatter, you will see documentation for this.

Do you think it would be worth having the null formatter as a
specified option?  The string "null" could easily have the default be
the null formatter - that would be easy to add.

I think the string 'none' might be a better fit for matplotlib conventions, for what it's worth.

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