Ignore:
Timestamp:
Jul 11, 2008, 4:15:59 PM (14 years ago)
Author:
duncan
Message:

Current Hinwood scenario - added plotting of froude number

File:
1 edited

Legend:

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

    r5461 r5494  
    1919    """
    2020    from pylab import ion, plot, xlabel, ylabel, close, legend, \
    21          savefig, title, axis
     21         savefig, title, axis, setp
    2222    from anuga.shallow_water.data_manager import csv2dict
    2323
     
    3636        ion()
    3737   
    38     plot(time_sim, quantity_sim, time_exp, quantity_exp)
     38    l_sim, l_exp = plot(time_sim, quantity_sim, time_exp, quantity_exp)
     39    setp(l_sim, color='r')
     40    setp(l_exp, color='b')
    3941
    4042    # Add axis stuff and legend
     
    7072                                   outputdir_name=outputdir_name)
    7173   
     74   
    7275    file_sim = pro_instance.outputdir + quantity + "_" + id + ".csv"
    7376    #print "file_exp",file_exp
     
    8790    return file_exp, file_sim, location_sims, location_exps, outputdir_name, \
    8891           save_as_list
    89 def plot(scenarios, outputdir_tag, quantity = "stage"):
     92def plot(scenarios, outputdir_tag, quantity = "stage",is_interactive=False):
    9093    plot_type = ".pdf"
    9194   
     
    120123                             plot_title=plot_title,
    121124                             y_label='Water '+ quantity +' (m)',
    122                              is_interactive=False,
     125                             is_interactive=is_interactive,
    123126                             save_as=save_as,
    124127                             use_axis=use_axis)
     128            if is_interactive is True:
     129                break
    125130   
    126131#-------------------------------------------------------------
     
    129134    """
    130135    from scenarios import scenarios
    131     outputdir_tag = "_good_tri_area_0.01_C"
    132     outputdir_tag = "_test_C"
     136    outputdir_tag = "_good_tri_area_0.01_D"
     137    #outputdir_tag = "_test_C"
    133138    #scenarios = scenarios[1:]
    134     #scenarios = [scenarios[0]]
    135     plot(scenarios, outputdir_tag)
     139    scenarios = [scenarios[0]]
     140    is_interactive = False
     141    #is_interactive = True
     142    plot(scenarios, outputdir_tag,is_interactive=is_interactive)
    136143
Note: See TracChangeset for help on using the changeset viewer.