#14580: Set individual legend font color in Sage
-------------------------------------+-------------------------------------
Reporter: ppurka | Owner: jason, was
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-5.12
Component: graphics | Resolution:
Keywords: | Merged in:
Authors: Punarbasu | Reviewers: Karl-Dieter Crisman,
Purkayastha, Karl-Dieter Crisman | Punarbasu Purkayastha
Report Upstream: N/A | Work issues:
Branch: | Dependencies: #13834
Stopgaps: |
-------------------------------------+-------------------------------------
Changes (by ppurka):
* status: needs_work => positive_review
Old description:
> Currently, it is not possible to change the legend font color in Sage at
> all.
> [http://permalink.gmane.org/gmane.comp.python.matplotlib.general/24674
> This link] shows how to do it in matplotlib - it is not straightforward
> in matplotlib either.
>
> I think the way to introduce it is
>
> 1. Allow a `legend_color` parameter to each plot.
> 2. Keep track of the individual legend colors via a key in the
> `Graphics._legend_opts` dictionary.
> 3. The key will contain a list of colors, defaulting to black or None (I
> prefer None, so that we use matplotlib's default).
> 4. After all the plots have been rendered and the legend as been set, we
> can follow the method in the link above to extract all the texts and set
> the colors individually, skipping the ones which are None (if the default
> is None).
>
> ----
>
> Apply [attachment:trac_14580-legend_color.patch] and
> [attachment:trac_14580-more-colors.patch] to devel/sage.
New description:
Currently, it is not possible to change the legend font color in Sage at
all.
[http://permalink.gmane.org/gmane.comp.python.matplotlib.general/24674
This link] shows how to do it in matplotlib - it is not straightforward in
matplotlib either.
I think the way to introduce it is
1. Allow a `legend_color` parameter to each plot.
2. Keep track of the individual legend colors via a key in the
`Graphics._legend_opts` dictionary.
3. The key will contain a list of colors, defaulting to black or None (I
prefer None, so that we use matplotlib's default).
4. After all the plots have been rendered and the legend as been set, we
can follow the method in the link above to extract all the texts and set
the colors individually, skipping the ones which are None (if the default
is None).
----
Apply [attachment:trac_14580-legend_color.patch] and
[attachment:trac_14580-more-colors-rebased.patch] to devel/sage.
--
Comment:
Rebased both the patches against #13834
--
Ticket URL: <http://trac.sagemath.org/ticket/14580#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.