##// END OF EJS Templates
Modificaciones para hacer graficos RTI en SpectraPlot2
Daniel Valdez -
r131:9470fac491a8
parent child
Show More
@@ -1,4 +1,5
1 import numpy
1 import numpy
2 import sys
2 import schainPlot
3 import schainPlot
3
4
4 class RTIFigure(schainPlot.Figure):
5 class RTIFigure(schainPlot.Figure):
@@ -15,7 +16,7 class RTIFigure(schainPlot.Figure):
15 minvalue = None
16 minvalue = None
16 maxvalue = None
17 maxvalue = None
17
18
18 idfigure = None
19 id = None
19 nframes = None
20 nframes = None
20 wintitle = wintitle
21 wintitle = wintitle
21 colormap = None
22 colormap = None
@@ -24,9 +25,9 class RTIFigure(schainPlot.Figure):
24
25
25 frameObjList = []
26 frameObjList = []
26
27
27 def __init__(self, idfigure, wintitle, xw=600, yw=800, overplot=0, driver='xwin', colormap='br_green', *showGraphs):
28 def __init__(self, id, wintitle, xw=600, yw=800, overplot=0, driver=None, colormap='br_green', *showGraphs):
28
29
29 self.idfigure = idfigure
30 self.id = id
30 self.wintitle = wintitle
31 self.wintitle = wintitle
31 self.colormap = colormap
32 self.colormap = colormap
32 self.driver = driver
33 self.driver = driver
@@ -34,11 +35,15 class RTIFigure(schainPlot.Figure):
34
35
35 self.showGraphs = showGraphs
36 self.showGraphs = showGraphs
36
37
37 self.__driverObj = Driver(driver)
38 showColorbar = showGraphs[0]
39 showPowerprofile = showGraphs[1]
40 self.__driverObj = Driver(id, wintitle,xw,yw,overplot,driver,colormap,showColorbar,showPowerprofile)
41
42
38
43
39 def __openDriver(self):
44 def __openDriver(self):
40
45
41 self.__driverObj.openDriver(self.idfigure, self.wintitle, self.xw, self.yw)
46 self.__driverObj.openDriver(self.id, self.wintitle, self.xw, self.yw)
42
47
43 def __openFigure(self):
48 def __openFigure(self):
44
49
@@ -2,25 +2,39 import plplot
2 import numpy
2 import numpy
3 import sys
3 import sys
4
4
5 class Driver:
5 class PlplotDriver:
6
6
7 __isDriverOpen = False
7 __isDriverOpen = False
8
8
9 def __init__(self, driver=plplot):
9 def __init__(self, id=None, driver=None, wintitle, overplot, colormap, showGraph1, showGraph2):
10
10
11 self.idStream = idStream
11 if id == None:
12 self.nFrames = nFrames
12 raise ValueError, 'id input must be defined'
13 self.winTitle = winTitle
13
14 self.colormap = colormap
14 if driver == None:
15 if sys.platform == "linux":
16 driver = ""
17 elif sys.platform == "darwin":
18 driver = ""
19 else:
20 driver = ""
21
22 self.id = id
15 self.driver = driver
23 self.driver = driver
16
24
25
26 self.nFrames = nFrames
27 self.wintitle = wintitle
28 self.colormap = colormap
17 self.showGraph1 = showGraph1
29 self.showGraph1 = showGraph1
18 self.showGraph2 = showGraph2
30 self.showGraph2 = showGraph2
19
31
20 self.overplot = overplot
32 self.overplot = overplot
21
33
22 def configDriver(self):
34 def configDriver(self):
23
35 if self.driver == "":
36 import plplot
37
24 pass
38 pass
25
39
26 def openDriver(self):
40 def openDriver(self):
@@ -83,8 +97,13 class Driver:
83 pass
97 pass
84
98
85
99
86 def config_driver(idStream, wintitle, width, height):
100
87 plplot.plsstrm(idStream)
101 class MplDriver:
102 def __init__(self):
103 pass
104
105 def config_driver(id, wintitle, width, height):
106 plplot.plsstrm(id)
88 plplot.plparseopts([wintitle],plplot.PL_PARSE_FULL)
107 plplot.plparseopts([wintitle],plplot.PL_PARSE_FULL)
89 plplot.plsetopt("geometry", "%dx%d"%(width,height))
108 plplot.plsetopt("geometry", "%dx%d"%(width,height))
90
109
General Comments 0
You need to be logged in to leave comments. Login now