I have a problem with implementing a matplotlib figure inside a tkinter window. Following other threads, i managed to do so, but i don't want the figure itself to be seen outside of the tkinter window as well as on the inside. The part of the code responsible for the plot:
from tkinter import * import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg fig = plt.figure(1) plt.ion() root = Tk() canvas = FigureCanvasTkAgg(fig,master=root) plot_widget = canvas.get_tk_widget().grid(column = 1, row = 1, rowspan = 11) while True: #data updating fig.canvas.draw() plt.pause(0.5) root.mainloop()
Thank you very much in advance!