[Matplotlib-devel] Generalize BoxStyle?

Benjamin Root ben.v.root at gmail.com
Fri Oct 16 12:38:18 EDT 2015


I see that there are ConnectionStyles, which is used for annotations,
obviously. Maybe this class would also benefit from having a base
"PathStyle" that BoxStyle and ConnectionStyle could work from. It would
probably de-duplicate a lot of code and make it possible to have fewer
lists of styles? At the very least, I think the steps-mid, steps-pre, etc.
drawstyles could be re-implemented as a PathStyle, which ConnectionStyle
could benefit from.

On Fri, Oct 16, 2015 at 12:19 PM, Benjamin Root <ben.v.root at gmail.com>
wrote:

> Looking into the recent "how to make a toothed curve" question, I started
> to wonder if the BoxStyle stuff could be refactored into something composed
> of draw style mutators, and at the same time rework the current draw style
> implementation? This way, one can easily create fancy lines or boxes, all
> using the same code and what-ever options are available for boxes are also
> available for lines.
>
> Does anyone see a roadblock/pitfall with this idea?
>
> (note, I am aware that this wouldn't solve the original poster's question
> because the sawtooth wouldn't be filled in, but it would be neat to have
> anyway).
>
> Cheers!
> Ben Root
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20151016/186c07ca/attachment.html>


More information about the Matplotlib-devel mailing list