If the above code still does not display the Tk-toplevel window, add the line:
plotGUI.lift() # force WM to raise Tk() window plotGUI.mainloop()
If the above code has problems with matplotlib -wrapper, you will need to more accurately determine which transfer method you use to get matplitlib -output in Tkinter Canvas, etc.
If the code tries to rely on matplotlib tools by default matplotlib , which means that the code will have two adjacent .mainloop() -s - first Tk() - second one is hidden by default matplotlib -s .show() - and therefore your code unlikely to be controlled by two adjacent user interfaces.
cointegrated user interface
For non-contiguous UI controllers and more benefits of a shared integrated interface, try reusing the backends factories for direct printing to Tkinter.Canvas and other plausible widgets of your choice and management.
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
and go to the fully integrated GUI-MVC levels on both your code and matplotlib Model-state / input-Controller / Visual-output.

A bit more code for a shared integrated user interface sample:
class SuperShapeFrame( Frame ): # The user interface: def __init__( self, master = None ): Frame.__init__( self, master ) self.grid() self.m = 3 self.n1 = 2 self.n1_scaling = LinearScaling( ( .1, 20 ), ( 0, 200 ) ) self.n2 = 18 self.n2_scaling = LinearScaling( ( .1, 20 ), ( 0, 200 ) ) self.n3 = 18 self.n3_scaling = LinearScaling( ( .1, 20 ), ( 0, 200 ) ) self.fig = Figure( ( 6, 6 ), dpi = 100 ) canvas = FigureCanvasTkAgg( self.fig, master = self ) canvas.get_tk_widget().grid( row = 0, column = 0, columnspan = 4 ) label = Label( self, text = 'M' ) label.grid( row = 1, column = 1 ) self.m_slider = Scale( self, from_ = 1, to = 20, \ orient = HORIZONTAL, command = lambda i : self.update_m() \ ) self.m_slider.grid( row = 1, column = 2 ) label = Label( self, text = 'N1' ) label.grid( row = 2, column = 1 ) self.n1_slider = Scale( self, from_ = 0, to = 200, \ orient = HORIZONTAL, command = lambda i : self.update_n1() \ ) self.n1_slider.grid( row = 2, column = 2 ) label = Label( self, text = 'N2' ) label.grid( row = 3, column = 1 ) self.n2_slider = Scale( self, from_ = 0, to = 200, \ orient = HORIZONTAL, command = lambda i : self.update_n2() \ ) self.n2_slider.grid( row = 3, column = 2 ) label = Label( self, text = 'N3' ) label.grid( row = 4, column = 1 ) self.n3_slider = Scale( self, from_ = 0, to = 200, orient = HORIZONTAL, command = lambda i : self.update_n3() \ ) self.n3_slider.grid( row = 4, column = 2 ) self.draw_figure() # >>> ================================================================ DRAW FIRST APPEARANCE OF THE INSTANCE def update_m( self ): self.m = self.m_slider.get() self.refresh_figure() # >>> .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. UPDATE def update_n1( self ): self.n1 = self.n1_scaling.dst_to_src( self.n1_slider.get() ) self.refresh_figure() # >>> .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. UPDATE def update_n2( self ): self.n2 = self.n2_scaling.dst_to_src( self.n2_slider.get() ) self.refresh_figure() # >>> .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. UPDATE def update_n3(self): self.n3 = self.n3_scaling.dst_to_src( self.n3_slider.get() ) self.refresh_figure() # >>> .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. UPDATE def refresh_figure( self ): # <<< .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. UPDATE ACTUAL APPEARANCE OF THE INSTANCE r = supershape_radius( self.phi, 1, 1, self.m, self.n1, self.n2, self.n3 ) # .CALC new polar values in radius dimension self.lines.set_ydata( r ) # .MOD <lines>, selectively just their <lines>.set_ydata() coordinates self.fig.canvas.draw_idle() # .GUI MVC-Visual part UPDATE via <self>.<fig>.<canvas>.draw_idle() def draw_figure( self ): # <<< =============================================================== DRAW FIRST APPEARANCE OF THE INSTANCE self.phi = np.linspace( 0, 2 * np.pi, 1024 ) # .STO <phi> a np.array with static fi-coordinates r = supershape_radius( self.phi, 1, 1, self.m, self.n1, self.n2, self.n3 ) ax = self.fig.add_subplot( 111, polar = True ) # self.lines, = ax.plot( self.phi, r, lw = 3. ) # .STO <lines> aListOfLINEs from .plot() function self.fig.canvas.draw() # .GUI MVC-Visual part, enforce first visual output via <self>.<fig>.<canvas>.draw() def TkDemo(): # Finally, we set up and start our user interface: """ HELP: CookBook: Tk-GUI-MVC via SuperShape example TESTS: TkDemo() """ root = Tk() root.lift() root.protocol( 'WM_DELETE_WINDOW', root.quit() ) # [X]-overide --------------------------- app = SuperShapeFrame( root ) # <<<--- pass <root> app.master.title( 'CookBook: Tk-GUI-MVC via SuperShape' ) app.mainloop() pass
Full code for [Halldinz0r] copy / paste retesting as is: