Changeset 13129 for fact/tools


Ignore:
Timestamp:
03/16/12 08:52:51 (13 years ago)
Author:
neise
Message:
moved _test_SimplePlotter() down in the file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/plotters.py

    r13118 r13129  
    3434        plt.draw()
    3535           
    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.number
    43     plot2 = SimplePlotter('plot2', x, 'g.')
    44     print 'plot2.fig.number: ', plot2.fig.number
    45    
    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 
    5736class Plotter(object):
    5837    """ simple x-y plot """
     
    321300        plt.draw()
    322301           
     302def _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')
    323321
    324322
Note: See TracChangeset for help on using the changeset viewer.