import tkinter as tk import matplotlib.pyplot as plt def modif(): x = float(entry.get()) lbl.configure(text="x vaut "+str(x)) plt.scatter(x, x) plt.show() fen = tk.Tk() lbl = tk.Label(fen, text="Le texte initial") lbl.grid() entry = tk.Entry() entry.grid() b1 = tk.Button(fen, text="bouton 1", command=modif) b1.grid() fig = plt.figure() plt.xlim(-5,5) plt.ylim(-5,5) fen.mainloop()