From fedfeee62f2e54ff97d28794f152de4406277ade 2012-03-29 20:03:42 From: Miguel Valdez Date: 2012-03-29 20:03:42 Subject: [PATCH] Actualización de la libreria de graficos para manejar varios plots --- diff --git a/schainpy/Graphics/SpectraPlot.py b/schainpy/Graphics/SpectraPlot.py index 336864b..40cc3f7 100644 --- a/schainpy/Graphics/SpectraPlot.py +++ b/schainpy/Graphics/SpectraPlot.py @@ -18,7 +18,7 @@ from Model.Spectra import Spectra class Spectrum(): - def __init__(self, Spectra): + def __init__(self, Spectra, index=0): """ @@ -38,6 +38,8 @@ class Spectrum(): self.nGraphs = 0 + self.indexPlot = index + self.graphObjList = [] self.m_Spectra = Spectra @@ -94,6 +96,7 @@ class Spectrum(): nx = int(numpy.sqrt(self.nGraphs)+1) #ny = int(self.nGraphs/nx) + plplot.plsstrm(self.indexPlot) plplot.plsetopt("geometry", "%dx%d" %(300*nx, 240*nx)) plplot.plsdev("xcairo") plplot.plscolbg(255,255,255) diff --git a/schainpy/Graphics/VoltagePlot.py b/schainpy/Graphics/VoltagePlot.py index 1ae3ef2..08753e0 100644 --- a/schainpy/Graphics/VoltagePlot.py +++ b/schainpy/Graphics/VoltagePlot.py @@ -16,7 +16,7 @@ from Model.Voltage import Voltage class Osciloscope(): - def __init__(self, Voltage): + def __init__(self, Voltage, index=0): """ @@ -38,8 +38,10 @@ class Osciloscope(): self.nGraphs = 0 + self.indexPlot = index + self.graphObjList = [] - + self.m_Voltage = Voltage @@ -80,6 +82,8 @@ class Osciloscope(): self.__isPlotConfig = True def iniPlot(self): + + plplot.plsstrm(self.indexPlot) plplot.plsetopt("geometry", "%dx%d" %(700, 115*self.nGraphs)) plplot.plsdev("xcairo") plplot.plscolbg(255,255,255)