260 | | ####################################### |
---|
261 | | # Last 7 days |
---|
262 | | ####################################### |
---|
263 | | |
---|
264 | | print ' ... Last 7 days' |
---|
265 | | ax = axs[0] |
---|
266 | | ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) |
---|
267 | | ax.xaxis.set_major_locator( DayLocator(range(0,32,1)) ) |
---|
268 | | ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) |
---|
269 | | ax.set_xticklabels([]) |
---|
270 | | ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) |
---|
271 | | |
---|
272 | | ax = axs[1] |
---|
273 | | ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) |
---|
274 | | ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) |
---|
275 | | ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) |
---|
276 | | ax.set_xticklabels([]) |
---|
277 | | |
---|
278 | | ax = axs[2] |
---|
279 | | ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) |
---|
280 | | ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) |
---|
281 | | ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) |
---|
282 | | ax.set_xticklabels([]) |
---|
283 | | |
---|
284 | | ax = axs[3] |
---|
285 | | ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) |
---|
286 | | ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) |
---|
287 | | ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) |
---|
288 | | ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) |
---|
289 | | ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) |
---|
290 | | |
---|
291 | | savefig('/home/haines/rayleigh/img/jpier_met_last07days.png') |
---|
292 | | |
---|
293 | | ####################################### |
---|
294 | | # Last 1 day (24hrs) |
---|
295 | | ####################################### |
---|
296 | | |
---|
297 | | print ' ... Last 1 days' |
---|
298 | | |
---|
299 | | ax = axs[0] |
---|
300 | | ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) |
---|
301 | | ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) |
---|
302 | | ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) |
---|
303 | | ax.set_xticklabels([]) |
---|
304 | | ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) |
---|
305 | | |
---|
306 | | ax = axs[1] |
---|
307 | | ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) |
---|
308 | | ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) |
---|
309 | | ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) |
---|
310 | | ax.set_xticklabels([]) |
---|
311 | | |
---|
312 | | ax = axs[2] |
---|
313 | | ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) |
---|
314 | | ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) |
---|
315 | | ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) |
---|
316 | | ax.set_xticklabels([]) |
---|
317 | | |
---|
318 | | ax = axs[3] |
---|
319 | | ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) |
---|
320 | | ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) |
---|
321 | | ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) |
---|
322 | | ax.xaxis.set_major_formatter( DateFormatter('%H') ) |
---|
323 | | ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) |
---|
324 | | |
---|
325 | | savefig('/home/haines/rayleigh/img/jpier_met_last01days.png') |
---|
326 | | |
---|
327 | | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | ####################################### |
---|
| 263 | # Last 30 days |
---|
| 264 | ####################################### |
---|
| 265 | if plot_type=='latest': |
---|
| 266 | print ' ... Last 30 days' |
---|
| 267 | for idx, ax in enumerate(axs): |
---|
| 268 | ax.set_xlim(date2num(dt[-1])-30, date2num(dt[-1])) |
---|
| 269 | ax.xaxis.set_major_locator( DayLocator(range(2,32,2)) ) |
---|
| 270 | ax.xaxis.set_minor_locator( HourLocator(range(0,25,12)) ) |
---|
| 271 | ax.set_xticklabels([]) |
---|
| 272 | if idx==0: |
---|
| 273 | ax.set_xlabel('JPIER Met -- Last 30 days from ' + last_dt_str) |
---|
| 274 | elif idx==len(axs)-1: |
---|
| 275 | ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) |
---|
| 276 | ax.set_xlabel('JPIER Met -- Last 30 days from ' + last_dt_str) |
---|
| 277 | |
---|
| 278 | savefig('/home/haines/rayleigh/img/jpier_met_last30days.png') |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | ####################################### |
---|
| 282 | # Last 7 days |
---|
| 283 | ####################################### |
---|
| 284 | if plot_type=='latest': |
---|
| 285 | print ' ... Last 7 days' |
---|
| 286 | for idx, ax in enumerate(axs): |
---|
| 287 | ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) |
---|
| 288 | ax.xaxis.set_major_locator( DayLocator(range(0,32,1)) ) |
---|
| 289 | ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) |
---|
| 290 | ax.set_xticklabels([]) |
---|
| 291 | if idx==0: |
---|
| 292 | ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) |
---|
| 293 | elif idx==len(axs)-1: |
---|
| 294 | ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) |
---|
| 295 | ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) |
---|
| 296 | |
---|
| 297 | savefig('/home/haines/rayleigh/img/jpier_met_last07days.png') |
---|
| 298 | |
---|
| 299 | |
---|
| 300 | ####################################### |
---|
| 301 | # Last 1 day (24hrs) |
---|
| 302 | ####################################### |
---|
| 303 | if plot_type=='latest': |
---|
| 304 | print ' ... Last 1 days' |
---|
| 305 | |
---|
| 306 | for idx, ax in enumerate(axs): |
---|
| 307 | ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) |
---|
| 308 | ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) |
---|
| 309 | ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) |
---|
| 310 | ax.set_xticklabels([]) |
---|
| 311 | if idx==0: |
---|
| 312 | ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) |
---|
| 313 | elif idx==len(axs)-1: |
---|
| 314 | ax.xaxis.set_major_formatter( DateFormatter('%H') ) |
---|
| 315 | ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) |
---|
| 316 | |
---|
| 317 | savefig('/home/haines/rayleigh/img/jpier_met_last01days.png') |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | |
---|