@@ -14,10 +14,8 @@ def __init__(self):
1414 super ().__init__ ()
1515 self .ui = Ui_MainWindow ()
1616 self .ui .setupUi (self )
17-
1817 self .grafica = Canvas_grafica ()
1918 self .ui .verticalLayout_grafica .addWidget (self .grafica )
20-
2119 self .ui .slider1 .valueChanged .connect (self .slider_uno )
2220 self .ui .slider2 .valueChanged .connect (self .slider_dos )
2321
@@ -33,7 +31,6 @@ def __init__(self, parent=None):
3331 super ().__init__ (self .fig )
3432 self .ax .grid ()
3533 self .ax .margins (x = 0 )
36-
3734 self .nivel1 = 10
3835 self .nivel2 = 1
3936 self .grafica_datos ()
@@ -46,13 +43,10 @@ def datos2(self, valor2):
4643
4744 def grafica_datos (self ):
4845 plt .title ("Grafica en PyQt5 con Matplotlib" )
49- #plt.xlim(-4, 32)
50- #plt.ylim(-12, 12)
5146 x = np .arange (- np .pi , 10 * np .pi , 0.01 )
5247 line , = self .ax .plot (x , self .nivel1 * np .sin (self .nivel2 * x ), color = 'r' ,linewidth = 2 )
5348 self .draw ()
5449 line .set_ydata (np .sin (x )+ 24 )
55- #print(self.nivel1, self.nivel2)
5650 QtCore .QTimer .singleShot (10 , self .grafica_datos )
5751
5852
@@ -61,12 +55,4 @@ def grafica_datos(self):
6155 mi_app = MiApp ()
6256 mi_app .show ()
6357 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