c'est le sujet 8 du tp tkinter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
403 B

7 months ago
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()