source: trunk/UTIL/PYTHON/planetoplot_v2/examples/simple.py @ 933

Last change on this file since 933 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
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4# we define a "planetoplot" object
5u = pp()
6
7# we define its attributes
8u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
9u.var = "u"
10u.t = "0.5" #NB: also works without quotes
11u.z = "10" #NB: also works without quotes
12
13# we get data
14u.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
20u.defineplot() 
21u.p[0].title = "This is what we name $u$"
22u.p[0].proj = "robin"
23u.filename = "simple"
24
25# we plot
26u.makeplot()
27
28# we simply change the colorbar
29# ... no need to reload data
30u.p[0].colorb = "RdBu"
31u.filename = "myplot"
32u.makeplot()
33
34# we remove map projection
35# ... idem, no need to reload data
36# ... but have to redefine plot
37u.noproj = True
38u.defineplot()
39u.makeplot()
40
41# we multiply the field by two
42# ... and redefine+remake the plot
43u = u * 2.
44u.defineplot()
45u.makeplot()
Note: See TracBrowser for help on using the repository browser.