#4342: Add legends to plot.py
---------------------------+------------------------------------------------
Reporter: anakha | Owner: anakha
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-4.4.3
Component: graphics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by jason):
Here is an example from contour_plot.py for using suboption:
{{{
@suboptions('label', fontsize=9, colors='blue', inline=None,
inline_spacing=3, fmt="%1.2f")
}}}
So I think you need to specify the options that you are passing in, and
their default values, in the @suboption decorator, rather than as a
dictionary in your plotting function. This will make the following
keyword arguments available:
label_fontsize, label_colors, label_inline, label_inline_spacing,
label_fmt
Inside the function, though, you will see all of these keyword arguments
as a single dictionary called label, and you'll access the options as
label['fontsize'], label['colors'], label['inline'], etc.
Does that explanation help?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4342#comment:29>
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.