[Thread Prev][Thread Next][Index]
Re: trajectory plot + colorbar (fwd)
Hi Michael,
You can use "PPL SHAKEY" to turn your color key. Refer
user manual Appendix C, Sec2.12 SHAKEY to find the usage. The trick is
to interchange yposition_low & yposition_high ( to turn vertical, default
color key) in SHAKEY. For example...
yes? use coads_climatology
yes? set reg/l=1/x=30:120/y=-30:30
yes? fill sst ! to make a plot and get the values for
yes? ppl list shakey ! arguments of default shakey
DO KEY ORIENT LAB SIZE LAB INC LAB DIG LAB LEN
1 1 0.00 0 3 9
DEFAULT KEY POSITIONING
X LO X HI Y LO Y HI
9.45 9.71 1.40 7.40
yes? fill/set sst ! to make a plot with "reversed" color key
yes? ppl shakey ,,,,,,,,7.40,1.40 ! changing only y_values
yes? ppl fill
Here (as attachment) is a modified version of the "polymark.jnl", with
an additional option for shakey as 7th argument. But 7th argument to the
new jnl file should be enclosed in double quotes like;
$1 $2 $3 $4 $5 $6 $7
GO polymark_new poly/over/key/levels=(-15,30,5) xpts,ypts,sst,circle, 0.5,",,,,,,,,7.4,1.4"
Hope this helps....
With Regards
Jaison
On Fri, 23 Apr 2004, Michael Traub wrote:
> Hi,
>
> I try to plot trajectories (lon vs. lat and colored the pressure
> height!) with following command
>
> GO polymark POLY/OVER/NOLAB/KEY/LEVELS="(200,1000,100)" LON+360 LAT
> PRESS/100 circle 0.2)
>
> How can I turn the colorbar, so that 200 is at the top of the colorbar
> and 1000 is at the bottom??
>
> Thanks in advance
>
> Michael
>
>
--
___________________________________________________
Jaison Kurian
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3942505
+91-80-3600450
Fax:+91-80-3600865
___________________________________________________
\cancel mode verify
! polymark_new.jnl
! 4/99 *sh* and *jd*
! 10/00 *sh* bug fix to scaling algorithm
!
! Description: Plot symbols colored by values of a variable along a track
! Usage: $1 $2 $3 $4 $5 $6 $7
! Yes? GO polymark polygon_command xpts ypts [values] [shape] [scale] [shakey]
! $1 - the plot command with qualifiers (eg POLYGON/OVER/KEY)
! $2 - X coordinates of track
! $3 - Y coordinates of track
! $4 - variable whose values will be plotted along the track (eg SST)
! $5 - shape of the symbol, as defined by polyshape.jnl
! $6 - scale the values by this factor (optional, default 1)
! $7 - ppl shakey arguments to control the color key orientn. and labelling
! in "double quotes" like "1,1,0,0,3,9,9.5,9.8,7.4,1.4"
! or ",,,,,,,,7.4,1.4"
! after making a dummy plot, use "PPL LIST SHAKEY" to
! see the default values
!
! shape names include:
! triangle delta square
! diamond pentagon hexagon
! circle star plus
! ex
! examples
! GO polymark polygon/over/key lon, lat, sst, diamond, 0.5,",,,,,,,,7.4,1.4"
! In detail, set cruise track and plot on a map:
! yes? LET xpts = 180 + 50*COS(2*3.14*I[I=1:50]/60)
! yes? LET ypts = 15 + 20*SIN(2*3.14*I[I=1:50]/60)
! yes? LET sst = 25 - ypts + RANDN(ypts)
! yes? GO basemap x=120:250 Y=25s:65n 20
!
! yes? GO polymark polygon/over/key/title="SST" xpts,ypts,sst,ex, 0.5
! argument check
QUERY/IGNORE $1"<usage: yes? GO polymark polygon_command xpts ypts [values] [shape] [scale]"
QUERY/IGNORE $2"<usage: yes? GO polymark polygon_command xpts ypts [values] [shape] [scale]"
QUERY/IGNORE $3"<usage: yes? GO polymark polygon_command xpts ypts [values] [shape] [scale]"
! save the input expressions into simple variable definitions
LET/QUIET PLMxpoly = ($2)
LET/QUIET PLMypoly = ($3)
LET/QUIET PLMpolydata = $4"0"
! determine the orientation of the data (and check that it is 1D or a point)
DEFINE SYMBOL PLMax `PLMxpoly,return=shape`
DEFINE SYMBOL PLMpoly_ax ($PLMax"|PT>Z|X>Z|Y>Z|Z>Y|T>Z|<error: data is not a point or line")
! units/inch scale factors
LET/QUIET PLMdefault_scale =$6"1" * 0.1
LET/QUIET PLMx_correction = PLMdefault_scale*((($xaxis_max))-(($xaxis_min)))/($ppl$xlen)
LET/QUIET PLMy_correction = PLMdefault_scale*((($yaxis_max))-(($yaxis_min)))/($ppl$ylen)
! optionally create the polygon coordinates, xpolyshape, ypolyshape
! else check that the coordinates exist
IF $5"0|*>1" THEN
GO polyshape $5
ELSE
LOAD xpolyshape, ypolyshape ! THESE MUST BE DEFINED BY GO polyshape
ENDIF
! make sure that the polygon coordinates are along the correct axis
! and correct the coordinates for unequal axis scaling and user scale factor
LET/QUIET PLMxpolymark = ($PLMpoly_ax)SEQUENCE(xpolyshape) * PLMx_correction
LET/QUIET PLMypolymark = ($PLMpoly_ax)SEQUENCE(ypolyshape) * PLMy_correction
$1/coord_ax=($PLMpoly_ax)/set_up PLMxpoly+PLMxpolymark, PLMypoly+PLMypolymark, PLMpolydata
ppl shakey $7" "
ppl fillpol/over
cancel symbol PLM*
cancel variable PLM*
set mode/last verify
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement