Ignore:
Timestamp:
Aug 18, 2008, 9:29:57 AM (15 years ago)
Author:
duncan
Message:

Current Hinwood - calc norm set up for _G end tag comparison

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/Hinwood_2008/plot.py

    r5659 r5664  
    1515                     legend_exp='Measured flume result',
    1616                     is_interactive=False,
    17                      use_axis=None):
     17                     x_axis=None,
     18                     y_axis=None):
    1819    """
    1920    """
     
    4748    legend((legend_sim, legend_exp),'upper left')
    4849    title(plot_title)
    49     if use_axis is not None:
    50         axis(use_axis)
     50    if x_axis is not None:
     51        axis(xmin=x_axis[0], xmax=x_axis[1])
    5152   
     53    if y_axis is not None:
     54        axis(ymin=y_axis[0], ymax=y_axis[1])
     55       
    5256    if is_interactive:
    5357        # Wait for enter pressed
     
    109113        #location_exps = [location_exps[0]]
    110114        #save_as_list = [save_as_list[0]]
    111         for loc_sim, loc_exp, save_as, gauge in map(None, location_sims,
    112                                                     location_exps,
    113                                                     save_as_list,
    114                                                     run_data['gauge_x']):
     115        for loc_sim, loc_exp, save_as, gauge, gauge_elev in \
     116                map(None, location_sims,
     117                    location_exps,
     118                    save_as_list,
     119                    run_data['gauge_x'],
     120                    run_data['gauge_bed_elevation']):
    115121            time_date = strftime('plot date: %d/%m/%Y Time: %H:%M:%S',
    116122                                      localtime())
    117123            plot_title = "Scenario: " + outputdir_name + "\n" + \
    118124                         "X Gauge (m):" + str(gauge) + "    " + time_date
     125
     126            # When the shore gauges out of the are used, don't
     127            # use the standard y axis scale
     128            x_axis = run_data['wave_times']
    119129            if gauge < run_data['axis_maximum_x']:
    120                 use_axis = run_data['axis']
     130                y_axis = [run_data['axis'][2],run_data['axis'][3]]
     131       
    121132            else:
    122                 use_axis = None
     133                y_axis = [run_data['axis'][2] + gauge_elev,
     134                          run_data['axis'][3] + gauge_elev]
    123135            print "Doing ", plot_title
    124136            plot_compare_csv(location_sim=loc_sim,
     
    130142                             is_interactive=is_interactive,
    131143                             save_as=save_as,
    132                              use_axis=use_axis)
     144                             x_axis=x_axis,
     145                             y_axis=y_axis)
    133146            if is_interactive is True:
    134147                break
     
    146159    #outputdir_tag = "_test_C"
    147160    #scenarios = scenarios[1:]
    148     #scenarios = [scenarios[4]]
     161    #scenarios = [scenarios[7]]
    149162    is_interactive = False
    150163    #is_interactive = True
Note: See TracChangeset for help on using the changeset viewer.