Last change
on this file since 1052 was
1051,
checked in by aslmd, 12 years ago
|
planetoplot. added an example to use ppplot to plot a sounding very easily.
|
-
Property svn:executable set to
*
|
File size:
602 bytes
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | import ppplot |
---|
3 | import numpy as np |
---|
4 | |
---|
5 | # load data |
---|
6 | # http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html |
---|
7 | p,z,t,dew,hum,mix,wdir,wknot,thta,thte,thtv \ |
---|
8 | = np.loadtxt("sounding.txt",skiprows=8,unpack=True) |
---|
9 | |
---|
10 | # make a simple plot |
---|
11 | sdg = ppplot.plot1d() |
---|
12 | sdg.f = z |
---|
13 | sdg.x = t |
---|
14 | sdg.makeshow() |
---|
15 | |
---|
16 | # Tweaking a little bit the plot |
---|
17 | sdg.linestyle = '-' |
---|
18 | sdg.marker = '.' |
---|
19 | sdg.color = 'r' |
---|
20 | sdg.ycoeff = 1.e-3 |
---|
21 | sdg.title = "A random terrestrial sounding" |
---|
22 | sdg.legend = "Fort Smith 00Z 26 Sep 2013" |
---|
23 | sdg.xlabel = "Temperature ($^{\circ}$C)" |
---|
24 | sdg.ylabel = "Altitude (km)" |
---|
25 | sdg.makeshow() |
---|
26 | |
---|
27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.