[Matplotlib-devel] Markup text

Nicolas P. Rougier Nicolas.Rougier at inria.fr
Mon Oct 10 01:06:25 EDT 2016



Based on the example rainbow_text.py in the gallery, I've tried to implement a simple markup extension to the text directive (see code below). It's far from complete but I would like to know if there's any interest in that and if it's worth making a MEP (and if yes, could someone remind me the procedure for doing that ?).

The idea is to be able to use pango-like markup text for quick/small changes of the text:


Examples:

"Hello <b>world</b>!"
"Hello <span color=blue>world</span>!"
"Hello <span family=serif size=x-small>world</span>"


Currently, the implementation only works for non-rotated text.


Nicolas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: markup.py
Type: text/x-python-script
Size: 4388 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20161010/79d05984/attachment.bin>


More information about the Matplotlib-devel mailing list