10 import matplotlib.pyplot
as plt
11 from matplotlib.figure
import Figure
29 def setPlot(self, title, expeData, bgData, obsData):
35 self.
state = self.
__f.add_subplot(211)
37 self.
state.plot(x, expeData,
'b', label=
'state')
39 if obsData
is not None:
40 for iobs
in obsData[
'x']:
43 self.
state.plot(xobs, yobs,
'rx', label=
'obs')
45 mini = np.amin(expeData) - 1
46 maxi = np.amax(expeData) + 3
47 self.
state.axis([0, n, mini, maxi])
51 if bgData
is not None:
53 for i
in range(0,
len(expeData)):
54 incrData.append(expeData[i] - bgData[i])
55 self.
state.plot(x, bgData,
'b:', label=
'background')
60 for i
in range(0,
len(xobs)):
61 yDep.append(float(yobs[i]) - bgData[int(xobs[i])])
65 self.
increment.plot([0, n], [0.0, 0.0],
'k-', label=
'')
68 ax.set_xticks(np.arange(0, 40, 5))
69 ax.set_yticks(np.arange(-5., 5., 0.5))
71 if incrData
is not None:
72 self.
increment.plot(x, incrData,
'b', label=
'increment')
74 self.
increment.plot(xobs, yDep,
'rx', label=
'departure')
91 if self.
state is not None:
def setPlot(self, title, expeData, bgData, obsData)