Changeset 4078
- Timestamp:
- Dec 14, 2006, 11:49:49 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4076 r4078 1053 1053 units = 'm' 1054 1054 if which_quantity == 'stage': 1055 plot(model_time[0:n[j]-1,k,j], stages[0:n[j]-1,k,j], '-', c = cstr[j]) 1055 if elevations[0:n[j]-1,k,j] < 0: 1056 plot(model_time[0:n[j]-1,k,j], stages[0:n[j]-1,k,j], '-', c = cstr[j]) 1057 else: 1058 plot(model_time[0:n[j]-1,k,j], depths[0:n[j]-1,k,j], '-', c = cstr[j]) 1056 1059 #axis(stage_axis) 1057 1060 units = 'm' … … 1083 1086 1084 1087 xlabel('time (mins)') 1085 ylabel('%s (%s)' %(which_quantity, units)) 1088 if which_quantity == 'stage' and elevations[0:n[j]-1,k,j] > 0: 1089 ylabel('%s (%s)' %('depth', units)) 1090 else: 1091 ylabel('%s (%s)' %(which_quantity, units)) 1086 1092 if len(label_id) > 1: legend((leg_label),loc='upper right') 1087 1093 … … 1130 1136 for i in range(nn-1): 1131 1137 if nn > 2: 1132 word_quantity += plot_quantity[i] + ', ' 1138 if plot_quantity[i] == 'stage' and elevations[0,k,j] > 0: 1139 word_quantity += 'depth' + ', ' 1140 else: 1141 word_quantity += plot_quantity[i] + ', ' 1133 1142 else: 1134 word_quantity += plot_quantity[i] 1143 if plot_quantity[i] == 'stage' and elevations[0,k,j] > 0: 1144 word_quantity += 'depth' + ', ' 1145 else: 1146 word_quantity += plot_quantity[i] 1135 1147 1136 word_quantity += ' and ' + plot_quantity[nn-1] 1148 if plot_quantity[nn-1] == 'stage' and elevations[0,k,j] > 0: 1149 word_quantity += ' and ' + 'depth' 1150 else: 1151 word_quantity += ' and ' + plot_quantity[nn-1] 1137 1152 caption = 'Time series for %s at %s location (elevation %.2fm)' %(word_quantity, locations[k], elev[k]) #gaugeloc.replace('_',' ')) 1138 1153 if elev[k] == 0.0: … … 1151 1166 for i in range(nn-1): 1152 1167 if nn > 2: 1153 word_quantity += plot_quantity[i] + ', ' 1168 if plot_quantity[i] == 'stage' and elevations[0,k,j] > 0: 1169 word_quantity += 'depth' + ',' 1170 else: 1171 word_quantity += plot_quantity[i] + ', ' 1154 1172 else: 1155 word_quantity += plot_quantity[i] 1173 if plot_quantity[i] == 'stage' and elevations[0,k,j] > 0: 1174 word_quantity += 'depth' 1175 else: 1176 word_quantity += plot_quantity[i] 1177 print 'hello', elevations[0,k,j] 1156 1178 where1 = 0 1157 1179 count1 += 1
Note: See TracChangeset
for help on using the changeset viewer.