@@ -14,10 +14,8 @@ def __init__(self):
14
14
super ().__init__ ()
15
15
self .ui = Ui_MainWindow ()
16
16
self .ui .setupUi (self )
17
-
18
17
self .grafica = Canvas_grafica ()
19
18
self .ui .verticalLayout_grafica .addWidget (self .grafica )
20
-
21
19
self .ui .slider1 .valueChanged .connect (self .slider_uno )
22
20
self .ui .slider2 .valueChanged .connect (self .slider_dos )
23
21
@@ -33,7 +31,6 @@ def __init__(self, parent=None):
33
31
super ().__init__ (self .fig )
34
32
self .ax .grid ()
35
33
self .ax .margins (x = 0 )
36
-
37
34
self .nivel1 = 10
38
35
self .nivel2 = 1
39
36
self .grafica_datos ()
@@ -46,13 +43,10 @@ def datos2(self, valor2):
46
43
47
44
def grafica_datos (self ):
48
45
plt .title ("Grafica en PyQt5 con Matplotlib" )
49
- #plt.xlim(-4, 32)
50
- #plt.ylim(-12, 12)
51
46
x = np .arange (- np .pi , 10 * np .pi , 0.01 )
52
47
line , = self .ax .plot (x , self .nivel1 * np .sin (self .nivel2 * x ), color = 'r' ,linewidth = 2 )
53
48
self .draw ()
54
49
line .set_ydata (np .sin (x )+ 24 )
55
- #print(self.nivel1, self.nivel2)
56
50
QtCore .QTimer .singleShot (10 , self .grafica_datos )
57
51
58
52
@@ -61,12 +55,4 @@ def grafica_datos(self):
61
55
mi_app = MiApp ()
62
56
mi_app .show ()
63
57
sys .exit (app .exec_ ())
64
- #self.ax = plt.axes()
65
- #self.ax=plt.gca()
66
- #plt.axis('off')
67
- #self.fig.subplots_adjust(top=1.1 ,bottom=-0.1, left=-0.1, right=1.1)
68
- #self.ax.get_xaxis().set_visible(False)
69
- #self.ax.spines['right'].set_visible(False)
70
- #self.ax.spines['top'].set_visible(False)
71
- #self.ax.spines['bottom'].set_visible(False)
72
- #self.ax.spines['left'].set_visible(False)
58
+
0 commit comments