Last change
on this file since 504 was
504,
checked in by dubos, 7 years ago
|
configs/testing : towards first working version
|
File size:
638 bytes
|
Rev | Line | |
---|
[502] | 1 | import numpy as np |
---|
| 2 | import netCDF4 as cdf |
---|
[504] | 3 | # select non-interactive backend, cf http://stackoverflow.com/questions/4931376/generating-matplotlib-graphs-without-a-running-x-server |
---|
| 4 | import matplotlib |
---|
| 5 | matplotlib.use('Agg') |
---|
[502] | 6 | import matplotlib.pyplot as plt |
---|
| 7 | |
---|
| 8 | def getdims(nc, *names): return [len(nc.dimensions[name]) for name in names] |
---|
| 9 | def getvars(nc, *names): return [nc.variables[name] for name in names] |
---|
| 10 | |
---|
| 11 | def axis_longitude(): |
---|
| 12 | plt.xlim((0,360)) |
---|
| 13 | plt.xlabel('longitude (degrees)') |
---|
| 14 | plt.xticks(np.arange(0,361,30)) |
---|
| 15 | |
---|
| 16 | def axis_latitude(): |
---|
| 17 | plt.ylim((-90,90)) |
---|
| 18 | plt.ylabel('latitude (degrees)') |
---|
| 19 | plt.yticks(np.arange(-90,91,30)) |
---|
| 20 | |
---|
Note: See
TracBrowser
for help on using the repository browser.