On Sat, Mar 19, 2016 at 7:56 PM, Edward K. Ream <[email protected]> wrote:

The matplotlib output machinery is very complicated, but surely there must
> be a way to redirect the results to Leo's viewrendered pane.  That would be
> totally cool.
>

​It won't be straightforward, for several reasons:

1. The MatPlotLib code creates what could be called a "virtual"
QMainWindow. This handles events only. However, we don't want to embed a
QMainWindow into Leo, which means that Leo would have to create an object
that looks like a QMainWindow to matplotlib but works like a QFrame as far
as Qt is concerned.

2. The MatPlotLib back end machinery is complex, and automatic, and
contains several Qt-related back ends.  Leo must:

A. Discover which back end is actually in effect.
B. Patch (or switch) the appropriate back end. This may require
back-end-specific code.

All this is surely possible.  As a first step, I'll ignore generalities and
attempt to patch the back end that I am actually using, namely qt4agg.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to