##// END OF EJS Templates
figure.py and mpldriver.py: Schain error replaced by ValueError
Miguel Valdez -
r696:0851a4f75acb
parent child
Show More
@@ -6,6 +6,7 import mpldriver
6 6 from schainpy.model.proc.jroproc_base import Operation
7 7
8 8 def isRealtime(utcdatatime):
9
9 10 utcnow = time.mktime(time.localtime())
10 11 delta = abs(utcnow - utcdatatime) # abs
11 12 if delta >= 30.:
@@ -15,7 +16,6 def isRealtime(utcdatatime):
15 16 class Figure(Operation):
16 17
17 18 __driver = mpldriver
18 __isConfigThread = False
19 19 fig = None
20 20
21 21 id = None
@@ -27,8 +27,8 class Figure(Operation):
27 27
28 28 axesObjList = []
29 29
30 WIDTH = None
31 HEIGHT = None
30 WIDTH = 300
31 HEIGHT = 200
32 32 PREFIX = 'fig'
33 33
34 34 xmin = None
@@ -40,7 +40,7 class Figure(Operation):
40 40
41 41 def __init__(self):
42 42
43 raise ValueError, "This method is not implemented"
43 raise NotImplementedError
44 44
45 45 def __del__(self):
46 46
@@ -58,7 +58,7 class Figure(Operation):
58 58
59 59 def getSubplots(self):
60 60
61 raise ValueError, "Abstract method: This method should be defined"
61 raise NotImplementedError
62 62
63 63 def getScreenDim(self, widthplot, heightplot):
64 64
@@ -81,7 +81,6 class Figure(Operation):
81 81
82 82 if timerange == None and (xmin==None or xmax==None):
83 83 timerange = 14400 #seconds
84 #raise ValueError, "(timerange) or (xmin & xmax) should be defined"
85 84
86 85 if timerange != None:
87 86 txmin = x[0] #- x[0] % min(timerange/10, 10*60)
@@ -105,7 +104,7 class Figure(Operation):
105 104
106 105 def init(self, id, nplots, wintitle):
107 106
108 raise ValueError, "This method has been replaced with createFigure"
107 raise NotImplementedError, "This method has been replaced with createFigure"
109 108
110 109 def createFigure(self, id, wintitle, widthplot=None, heightplot=None, show=True):
111 110
@@ -156,11 +155,11 class Figure(Operation):
156 155
157 156 def setTextFromAxes(self, text):
158 157
159 raise ValueError, "Este metodo ha sido reemplazaado con el metodo setText de la clase Axes"
158 raise NotImplementedError, "This method has been replaced with Axes.setText"
160 159
161 160 def makeAxes(self, nrow, ncol, xpos, ypos, colspan, rowspan):
162 161
163 raise ValueError, "Este metodo ha sido reemplazaado con el metodo addAxes"
162 raise NotImplementedError, "This method has been replaced with Axes.addAxes"
164 163
165 164 def addAxes(self, *args):
166 165 """
@@ -246,7 +245,7 class Figure(Operation):
246 245
247 246 def run(self):
248 247
249 raise ValueError, "This method is not implemented"
248 raise NotImplementedError
250 249
251 250 def close(self, show=False):
252 251
@@ -12,7 +12,7 if 'darwin' in sys.platform:
12 12 import matplotlib.pyplot
13 13
14 14 from mpl_toolkits.axes_grid1 import make_axes_locatable
15 from matplotlib.ticker import *
15 from matplotlib.ticker import FuncFormatter, LinearLocator
16 16
17 17 ###########################################
18 18 #Actualizacion de las funciones del driver
@@ -40,12 +40,12 def closeFigure(show=False, fig=None):
40 40
41 41 if fig != None:
42 42 matplotlib.pyplot.close(fig.number)
43 # matplotlib.pyplot.pause(0.1)
43 matplotlib.pyplot.pause(0.1)
44 44 # matplotlib.pyplot.ion()
45 45 return
46 46
47 47 matplotlib.pyplot.close("all")
48 # matplotlib.pyplot.pause(0.1)
48 matplotlib.pyplot.pause(0.1)
49 49 # matplotlib.pyplot.ion()
50 50 return
51 51
General Comments 0
You need to be logged in to leave comments. Login now