[Matplotlib-devel] Response to architecture query

Michael Droettboom mdroettboom at continuum.io
Wed Feb 10 23:52:43 EST 2016


On Tue, Feb 9, 2016 at 5:27 PM, Chris Barker <chris.barker at noaa.gov> wrote:

> On Tue, Feb 9, 2016 at 8:52 AM, Benjamin Root <ben.v.root at gmail.com>
> wrote:
>
>> as well as the figure/canvas/manager relationships for interactivity.
>>
>
> this is a big one -- I tried to debug the wxAgg backend once, and it was
> simply littered with calls to render the screen -- and it was next to
> impossible to figure out when rendering was actually supposed to happen.
>

The relationship between the backend classes is documented in
`backend_base.py`.

The interaction is essentially:

1) The GUI framework receives an event to redraw the window
2) This triggers the `paint` callback method
3) This calls the figure's draw method which renders the figure into an
image buffer
4) The image buffer is copied to the window's image buffer
5) The GUI framework through layers of abstraction we don't have to concern
ourselves with paints the window's image buffer to the screen


> I suspect class were simply added all over the place until it seemed to
> work.
>

The backend classes are actually some of the better-reasoned parts of the
code base.  For more information, see
http://www.aosabook.org/en/matplotlib.html


>
> I can image other back-end suffer from the same issues.
>
> </rant>
>
>
> -CHB
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
>
>


-- 
Michael Droettboom
Continuum Analytics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160210/84700b96/attachment.html>


More information about the Matplotlib-devel mailing list