Skip to content

Commit df538d0

Browse files
authored
Update grafica_matplotlib_scale.py
1 parent 832153c commit df538d0

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Tkinter y Matplotlib Grafica Seno - Slider/grafica_matplotlib_scale.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import numpy as np
88
import matplotlib.pyplot as plt
99

10-
1110
fig, ax = plt.subplots(dpi=90, figsize=(7,5),facecolor='#00faafb7')
1211
plt.title("Grafica en Tkinter con Matplotlib",color='red',size=16, family="Arial")
1312

@@ -18,29 +17,22 @@
1817
ax.axhline(linewidth=2, color='r')
1918
ax.axvline(linewidth=2, color='r')
2019

21-
2220
ax.set_xlabel("Eje Horizontal", color='black')
2321
ax.set_ylabel("Eje Vertical", color='black')
2422
ax.tick_params(direction='out', length=6, width=2,
2523
colors='black',
2624
grid_color='r', grid_alpha=0.5)
2725

28-
2926
def graficar_datos():
3027
nivel = scale.get()
3128
x = np.arange(-np.pi, 4*np.pi, 0.01)
32-
3329
line, = ax.plot(x, nivel*np.sin(x),
3430
color ='b', linestyle='solid')
3531
canvas.draw()
36-
3732
label.config(text= nivel)
38-
3933
line.set_ydata(np.sin(x)+10)
40-
4134
ventana.after(100, graficar_datos)
4235

43-
4436
ventana = Tk()
4537
ventana.geometry('642x498')
4638
ventana.wm_title('Grafica Matplotlib con Scale')
@@ -61,6 +53,5 @@ def graficar_datos():
6153

6254
style = ttk.Style()
6355
style.configure("Horizontal.TScale", background= 'gray22')
64-
6556
ventana.mainloop()
6657

0 commit comments

Comments
 (0)