10 import matplotlib.pyplot 
as plt
 
   11 from matplotlib.figure 
import Figure
 
   21     self.
__f__f = Figure()
 
   29   def setPlot(self, title, expeData, bgData, obsData):
 
   35     self.
statestate = self.
__f__f.add_subplot(211)
 
   37     self.
statestate.plot(x, expeData, 
'b', label=
'state')
 
   39     if obsData 
is not None:
 
   40       for iobs 
in obsData[
'x']:
 
   43       self.
statestate.plot(xobs, yobs, 
'rx', label=
'obs')
 
   45     mini = np.amin(expeData) - 1
 
   46     maxi = np.amax(expeData) + 3
 
   47     self.
statestate.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.
statestate.plot(x, bgData, 
'b:', label=
'background')
 
   56     self.
statestate.legend()
 
   60         for i 
in range(0, len(xobs)):
 
   61           yDep.append(float(yobs[i]) - bgData[int(xobs[i])])      
 
   65     self.
incrementincrement.plot([0, n], [0.0, 0.0], 
'k-', label=
'')
 
   67     ax = self.
__f__f.gca()
 
   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.
incrementincrement.plot(x, incrData, 
'b', label=
'increment')
 
   74       self.
incrementincrement.plot(xobs, yDep, 
'rx', label=
'departure')
 
   75     self.
incrementincrement.axis([0, n, -2, 2])
 
   90       self.
__f__f.texts = []
 
   91       if self.
statestate 
is not None:
 
   95       self.
statestate = 
None 
def setPlot(self, title, expeData, bgData, obsData)