@@ -18,7 +18,7 from Model.Spectra import Spectra | |||||
18 |
|
18 | |||
19 | class Spectrum(): |
|
19 | class Spectrum(): | |
20 |
|
20 | |||
21 | def __init__(self, Spectra): |
|
21 | def __init__(self, Spectra, index=0): | |
22 |
|
22 | |||
23 | """ |
|
23 | """ | |
24 |
|
24 | |||
@@ -38,6 +38,8 class Spectrum(): | |||||
38 |
|
38 | |||
39 | self.nGraphs = 0 |
|
39 | self.nGraphs = 0 | |
40 |
|
40 | |||
|
41 | self.indexPlot = index | |||
|
42 | ||||
41 | self.graphObjList = [] |
|
43 | self.graphObjList = [] | |
42 |
|
44 | |||
43 | self.m_Spectra = Spectra |
|
45 | self.m_Spectra = Spectra | |
@@ -94,6 +96,7 class Spectrum(): | |||||
94 | nx = int(numpy.sqrt(self.nGraphs)+1) |
|
96 | nx = int(numpy.sqrt(self.nGraphs)+1) | |
95 | #ny = int(self.nGraphs/nx) |
|
97 | #ny = int(self.nGraphs/nx) | |
96 |
|
98 | |||
|
99 | plplot.plsstrm(self.indexPlot) | |||
97 | plplot.plsetopt("geometry", "%dx%d" %(300*nx, 240*nx)) |
|
100 | plplot.plsetopt("geometry", "%dx%d" %(300*nx, 240*nx)) | |
98 | plplot.plsdev("xcairo") |
|
101 | plplot.plsdev("xcairo") | |
99 | plplot.plscolbg(255,255,255) |
|
102 | plplot.plscolbg(255,255,255) |
@@ -16,7 +16,7 from Model.Voltage import Voltage | |||||
16 |
|
16 | |||
17 | class Osciloscope(): |
|
17 | class Osciloscope(): | |
18 |
|
18 | |||
19 | def __init__(self, Voltage): |
|
19 | def __init__(self, Voltage, index=0): | |
20 |
|
20 | |||
21 | """ |
|
21 | """ | |
22 |
|
22 | |||
@@ -38,8 +38,10 class Osciloscope(): | |||||
38 |
|
38 | |||
39 | self.nGraphs = 0 |
|
39 | self.nGraphs = 0 | |
40 |
|
40 | |||
|
41 | self.indexPlot = index | |||
|
42 | ||||
41 | self.graphObjList = [] |
|
43 | self.graphObjList = [] | |
42 |
|
|
44 | ||
43 | self.m_Voltage = Voltage |
|
45 | self.m_Voltage = Voltage | |
44 |
|
46 | |||
45 |
|
47 | |||
@@ -80,6 +82,8 class Osciloscope(): | |||||
80 | self.__isPlotConfig = True |
|
82 | self.__isPlotConfig = True | |
81 |
|
83 | |||
82 | def iniPlot(self): |
|
84 | def iniPlot(self): | |
|
85 | ||||
|
86 | plplot.plsstrm(self.indexPlot) | |||
83 | plplot.plsetopt("geometry", "%dx%d" %(700, 115*self.nGraphs)) |
|
87 | plplot.plsetopt("geometry", "%dx%d" %(700, 115*self.nGraphs)) | |
84 | plplot.plsdev("xcairo") |
|
88 | plplot.plsdev("xcairo") | |
85 | plplot.plscolbg(255,255,255) |
|
89 | plplot.plscolbg(255,255,255) |
General Comments 0
You need to be logged in to leave comments.
Login now