Last change
on this file since 1004 was
933,
checked in by aslmd, 12 years ago
|
UTIL PYTHON planetoplot_v2. units: set an additional column set_var.txt and put units over colorbar. 1D bounding and formatting. possible mode nothing. corrected bug coast/sea.
|
-
Property svn:executable set to
*
|
File size:
890 bytes
|
Rev | Line | |
---|
[910] | 1 | #! /usr/bin/env python |
---|
| 2 | from ppclass import pp |
---|
| 3 | |
---|
| 4 | # we define a "planetoplot" object |
---|
| 5 | u = pp() |
---|
| 6 | |
---|
| 7 | # we define its attributes |
---|
| 8 | u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc" |
---|
| 9 | u.var = "u" |
---|
| 10 | u.t = "0.5" #NB: also works without quotes |
---|
| 11 | u.z = "10" #NB: also works without quotes |
---|
| 12 | |
---|
| 13 | # we get data |
---|
| 14 | u.get() |
---|
| 15 | |
---|
| 16 | ## we smooth the field a little bit |
---|
| 17 | #u.smooth(15) |
---|
| 18 | |
---|
| 19 | # we define the plot, then set a few personal stuff |
---|
| 20 | u.defineplot() |
---|
[933] | 21 | u.p[0].title = "This is what we name $u$" |
---|
[910] | 22 | u.p[0].proj = "robin" |
---|
[923] | 23 | u.filename = "simple" |
---|
[910] | 24 | |
---|
| 25 | # we plot |
---|
| 26 | u.makeplot() |
---|
| 27 | |
---|
| 28 | # we simply change the colorbar |
---|
| 29 | # ... no need to reload data |
---|
| 30 | u.p[0].colorb = "RdBu" |
---|
[923] | 31 | u.filename = "myplot" |
---|
[910] | 32 | u.makeplot() |
---|
| 33 | |
---|
| 34 | # we remove map projection |
---|
| 35 | # ... idem, no need to reload data |
---|
| 36 | # ... but have to redefine plot |
---|
| 37 | u.noproj = True |
---|
| 38 | u.defineplot() |
---|
| 39 | u.makeplot() |
---|
| 40 | |
---|
| 41 | # we multiply the field by two |
---|
| 42 | # ... and redefine+remake the plot |
---|
| 43 | u = u * 2. |
---|
| 44 | u.defineplot() |
---|
| 45 | u.makeplot() |
---|
Note: See
TracBrowser
for help on using the repository browser.