That's a cool feature, and one I have not come across before.

I hesitate slightly because this it is non-standard (by that, I mean not 
available in a lot of "mainstream" formats like CSS, SVG etc.), but 
maybe that's just because they aren't as cool as matplotlib... ;)  The 
nice thing is that the "!" isn't meaningful in color strings at present, 
so this new syntax is at least unambiguous with anything pre-existing.

I'm for it, but would like to hear from others first.

Cheers,
Mike

Jae-Joon Lee wrote:
> Hello,
>
> Attached is a small patch to add a simple color mix operation support.
> For example, "red!30!white" mixes 30% of red with 70% of white. The
> syntax is borrowed from latex xcolor package
> (http://www.ukern.de/tex/xcolor.html).
> I found it quite handy with the fancy box thing.
>
> plt.text(0.6, 0.5, "test", size=50, rotation=30.,
>          bbox = dict(boxstyle="round",
>                      fc="orange!20!white", # 20% orange + 80% white
>                      ec="orange!50!white", # 50 % orange + 50% white
>                      )
>          )
>
> plt.text(0.5, 0.4, "test", size=50, rotation=-30.,
>          bbox = dict(boxstyle="square",
>                      fc="aqua!50!green!20!white",
>                      ec="green!40!white",
>                      )
>          )
>
> Any chance this could be included in matplotlib?
> Regards,
>
> -JJ
>   
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to