#14580: Set individual legend font color in Sage
--------------------------------------------------------------+-------------
       Reporter:  ppurka                                      |         Owner:  
jason, was         
           Type:  enhancement                                 |        Status:  
needs_review       
       Priority:  major                                       |     Milestone:  
sage-5.11          
      Component:  graphics                                    |    Resolution:  
                   
       Keywords:                                              |   Work issues:  
                   
Report Upstream:  N/A                                         |     Reviewers:  
Karl-Dieter Crisman
        Authors:  Punarbasu Purkayastha, Karl-Dieter Crisman  |     Merged in:  
                   
   Dependencies:                                              |      Stopgaps:  
                   
--------------------------------------------------------------+-------------
Changes (by {'newvalue': u'Punarbasu Purkayastha, Karl-Dieter Crisman', 
'oldvalue': u'Punarbasu Purkayastha'}):

 * cc: sd48 (added)
  * author:  Punarbasu Purkayastha => Punarbasu Purkayastha, Karl-Dieter
             Crisman


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] 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.patch] to devel/sage.

--

Comment:

 Patchbot, apply trac_14580-legend_color.patch  and trac_14580-more-
 colors.patch

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14580#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 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.


Reply via email to