Changeset 13129 for fact/tools/pyscripts/pyfact/plotters.py
- Timestamp:
- 03/16/12 08:52:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/plotters.py
r13118 r13129 34 34 plt.draw() 35 35 36 def _test_SimplePlotter():37 """ test of maintaining two independant plotter instances """38 plt.ion()39 40 x = np.linspace(0., 10.)41 plot1 = SimplePlotter('plot1', x, 'r')42 print 'plot1.fig.number: ', plot1.fig.number43 plot2 = SimplePlotter('plot2', x, 'g.')44 print 'plot2.fig.number: ', plot2.fig.number45 46 plot1(np.sin(x) * 7.)47 plot2(x*x)48 49 raw_input('next')50 51 plot1(np.cos(x) * 3.)52 plot2(x)53 54 raw_input('next')55 56 57 36 class Plotter(object): 58 37 """ simple x-y plot """ … … 321 300 plt.draw() 322 301 302 def _test_SimplePlotter(): 303 """ test of maintaining two independant plotter instances """ 304 plt.ion() 305 306 x = np.linspace(0., 10.) 307 plot1 = SimplePlotter('plot1', x, 'r') 308 print 'plot1.fig.number: ', plot1.fig.number 309 plot2 = SimplePlotter('plot2', x, 'g.') 310 print 'plot2.fig.number: ', plot2.fig.number 311 312 plot1(np.sin(x) * 7.) 313 plot2(x*x) 314 315 raw_input('next') 316 317 plot1(np.cos(x) * 3.) 318 plot2(x) 319 320 raw_input('next') 323 321 324 322
Note:
See TracChangeset
for help on using the changeset viewer.