On Jan 28, 11:20 pm, kcrisman <[email protected]> wrote: > On Jan 28, 9:52 am, "D. S. McNeil" <[email protected]> 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 athttp://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. > > - kcrisman First of all thanks to you and the others for the helpful suggestions.
Whatever it ends up being called, a null formatter option would be useful, I think. In fact, it would be nice to be able to specify arbitrary labels for each tick mark (not necessarily corresponding to the numbers that they represent). I don't think this done in http://www.sagemath.org/doc/reference/sage/plot/plot.html, although with matplotlib directly I suppose it could be done. So, for example, along with tick mark specifications such as [ [1, 1,2], [ 2, 3] ], there could be a corresponding tick label list: [ ['label for tick at 1', 'label for tick at 1.2'], ['label for tick 2', 'label for tick 3'] ]. If I remember rightly there might be something a bit like this in Mathematica. Jeff -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
