On 7/26/11 12:47 PM, Dox wrote:
Sorry for bothering you again... but I got another question.I plot the following command: q = plot(tanh(x), (x,-5,5), ticks=[[-1,1],[]], tick_formatter=ticker.IndexFormatter([r"$-\frac{\delta}{2}$",r"$ \frac{\delta}{2}$"]), axes_labels=[r"$\xi$",r"$\phi$"], fontsize=15, thickness=2) q.show() and it worked... But, How could I insert named ticks on the vertical axis? I tried, q = plot(tanh(x), (x,-5,5), ticks=[[-1,1],[-1,1]], tick_formatter=ticker.IndexFormatter([[r"$-\frac{\delta}{2}$",r"$ \frac{\delta}{2}$"],['$-\\eta$','$\\eta$']]), axes_labels=[r"$\xi$",r"$ \phi$"], fontsize=15, thickness=2) q.show() but doesn't work... tried to check the documentation on matplotlib.ticker and found nothing enlightening.
tick_formatter should be given a list of two items. The first is the formatter for the x-axis, the second for the y-axis.
Jason -- 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
