#1431: basic plotting: add support for setting the location and labels of all
tick
marks on the x and y axes
------------------------------------------------+---------------------------
Reporter: was | Owner: kcrisman
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.4.3
Component: graphics | Keywords:
Author: Jason Grout, Karl-Dieter Crisman | Upstream: N/A
Reviewer: Karl-Dieter Crisman | Merged:
Work_issues: |
------------------------------------------------+---------------------------
Comment(by jason):
From private email, in response to kcrisman's comment above:
>
>
> Hmm, that's true. I don't know - this is more of a design decision
> than anything. In theory, we could latex ALL our tick labels, but that
> seems overkill. On the other hand, the solution to this would be kind
> of cludgy.
>
> Also, I was thinking about it this morning and wondered whether it
> would make sense to have the "tick_locator" keyword be just "ticks" or
> "tick" instead. Mma using "ticks", and "tick_locator" is a little
> longish ("tick_formatter" makes sense, though).
>
> Let me know if you have any ideas.
+1 to "ticks"
I'm not sure what to do about the latex issue. I suppose the real problem
here is that matplotlib does not use compatible fonts for $1$ and just
straight 1. That's a bummer. Still, in the common case (i.e., people
didn't specify formatters), I think we should make it all latex or all not
latex. plot(sin(x), (x,0,pi), tick_formatter=pi) is likely to be a very
common case, and we shouldn't have "ugly" output for it. It looks like it
might be as easy as changing the line:
{{{
1818 if y_formatter is None:
1819 y_formatter = OldScalarFormatter()
}}}
to
{{{
if y_formatter is None:
y_formatter = copy(x_formatter) # maybe copy isn't needed
}}}
We could then also delete the if statement above dealing with setting both
formatters to "latex" if tick_formatter="latex".
The one problem with this is that plot(..., ticks=pi) would change both
the x and the y axis. Maybe we could special-case that situation.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1431#comment:32>
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.