#1431: basic plotting: add support for setting the location and labels of all
tick
marks on the x and y axes
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.3
Component: graphics | Keywords:
Work_issues: | Author: Jason Grout
Reviewer: | Merged:
---------------------------+------------------------------------------------
Comment(by jason):
One last one that is even simpler:
{{{
def multiple_of_pi(n,pos):
c=[i for i in convergents(n/pi) if i.denominator()<=12]
return '$%s$'%latex(c[-1]*pi)
from matplotlib.ticker import MultipleLocator, FuncFormatter
plot(sin(x), (x, -10, 10), tick_locator=MultipleLocator(float(pi/2)),
tick_formatter=FuncFormatter(multiple_of_pi),figsize=[10,4])
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1431#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---