<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)">FWIW, I wrote a Tkinter-based GUI program several years ago where I embedded a matplotlib canvas in my own window, and I used pyplot just fine.  I put it up on GitHub yesterday which you can use as an example (<a href="https://github.com/swails/mdout_analyzer">https://github.com/swails/mdout_analyzer</a>) in case it helps.</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">For me, also, the key ingredient was setting the Tk backend to avoid competing mainloops for the different GUI toolkits.  The reason I embedded the matplotlib graphs in my own window is so that I could destroy those windows when the main control window was closed (if you rely on matplotlib to create the windows for you, you can't control that window as easily from other parts of your application).</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">All the best,</div><div class="gmail_default" style="color:rgb(0,0,0)">Jason</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 1:05 PM, Eric's Gmail <span dir="ltr"><<a href="mailto:eric.shain@gmail.com" target="_blank">eric.shain@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Awesome!<div><br></div><div>This works so long as I callout before the importing of pyplot.</div><div><br><div>
<div>Eric</div>

</div>
<br><div><blockquote type="cite"><div>On May 18, 2016, at 11:13 AM, Eric Firing <<a href="mailto:efiring@hawaii.edu" target="_blank">efiring@hawaii.edu</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">matplotlib.use('tkagg')</span></div></blockquote></div><br></div></div><br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Jason M. Swails</div></div></div></div>
</div>