@@ -27,16 +27,13 @@ def slider_uno(self, event):
2727 def slider_dos (self , event ):
2828 self .grafica .datos2 (event )
2929
30-
3130class Canvas_grafica (FigureCanvas ):
3231 def __init__ (self , parent = None ):
3332 self .fig , self .ax = plt .subplots (facecolor = 'gray' )
3433 super ().__init__ (self .fig )
3534 self .ax .grid ()
3635 self .ax .margins (x = 0 )
3736
38-
39-
4037 self .nivel1 = 10
4138 self .nivel2 = 1
4239 self .grafica_datos ()
@@ -51,12 +48,10 @@ def grafica_datos(self):
5148 plt .title ("Grafica en PyQt5 con Matplotlib" )
5249 #plt.xlim(-4, 32)
5350 #plt.ylim(-12, 12)
54-
5551 x = np .arange (- np .pi , 10 * np .pi , 0.01 )
5652 line , = self .ax .plot (x , self .nivel1 * np .sin (self .nivel2 * x ), color = 'r' ,linewidth = 2 )
5753 self .draw ()
58- line .set_ydata (np .sin (x )+ 24 )
59-
54+ line .set_ydata (np .sin (x )+ 24 )
6055 #print(self.nivel1, self.nivel2)
6156 QtCore .QTimer .singleShot (10 , self .grafica_datos )
6257
@@ -66,13 +61,12 @@ def grafica_datos(self):
6661 mi_app = MiApp ()
6762 mi_app .show ()
6863 sys .exit (app .exec_ ())
69-
70- #self.ax = plt.axes()
71- #self.ax=plt.gca()
72- #plt.axis('off')
73- #self.fig.subplots_adjust(top=1.1 ,bottom=-0.1, left=-0.1, right=1.1)
74- #self.ax.get_xaxis().set_visible(False)
75- #self.ax.spines['right'].set_visible(False)
76- #self.ax.spines['top'].set_visible(False)
77- #self.ax.spines['bottom'].set_visible(False)
78- #self.ax.spines['left'].set_visible(False)
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)
0 commit comments