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