Changeset 3010


Ignore:
Timestamp:
May 29, 2006, 2:53:46 PM (19 years ago)
Author:
ole
Message:

beautification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • development/stochastic_study/plot_spread.py

    r3006 r3010  
    33
    44# Standard modules
    5 import sys, os
     5import sys, os, string
    66
    77# Related major packages
     
    1515# Initialise
    1616# Read in all realisations-timeseries
    17 time, data, filenames = read_realisations('cyclone1',
     17#study = 'cyclone1'
     18study = 'nautilus3'
     19
     20time, data, filenames = read_realisations(study,
    1821                                          max_realisations = 200,
    1922                                          use_cache=True)
    20 #time, data, filenames = read_realisations('test', exclude='_0_',
    21 #                                          max_realisations = 200,
    22 #                                          use_cache=True)
    23 #time, data, filenames = read_realisations('nautilus1', exclude='_0_')
    2423number_of_realisations = data.shape[1]
    2524
     
    3231#hold(False)
    3332
    34 # Simple plot of timeseries for different realisations
     33
    3534for j in range(20):
    36     print j, filenames[j]
     35    #print j, filenames[j]
    3736    plot(time, data[:,j], 'k-')
    3837   
    3938    xlabel('time(s)')
    4039    ylabel('stage (m)')
    41     title('Timeseries for realisation %d of %d' %(j, number_of_realisations-1))
     40
     41    shortname = string.join(os.path.split(filenames[j])[-1].split('_')[-2:], '_')
     42    title('Study %s: timeseries for %s (realisation %d of %d)'\
     43          %(study, shortname, j, number_of_realisations-1))
     44   
     45    #title('Study %s: timeseries for %s (realisation %d of %d)'\
     46    #      %(study, filenames[j], j, number_of_realisations-1))   
    4247    raw_input('Next')
    4348 
     
    5358    xlabel('realisations')
    5459    ylabel('stage (m)')
    55     title('Spread at timestep %d of %d (t=%.2f)'\
    56           %(i, project.number_of_timesteps-1, time[i]))       
     60    title('Study %s: spread at timestep %d of %d (t=%.2f)'\
     61          %(study, i, project.number_of_timesteps-1, time[i]))       
    5762    raw_input('Next')
    5863
     
    7479    xlabel('stage (m)')
    7580    ylabel('frequency')
    76     title('Histogram at timestep %d of %d (t=%.2f)'\
    77           %(i, project.number_of_timesteps-1, time[i]))       
     81    title('Study %s: histogram at timestep %d of %d (t=%.2f)'\
     82          %(study, i, project.number_of_timesteps-1, time[i]))       
    7883    raw_input('Next')
    7984
Note: See TracChangeset for help on using the changeset viewer.