Drawing lines connecting station data
Tess Parker
t.parker at UGRAD.UNIMELB.EDU.AU
Mon Apr 27 00:47:44 EDT 2009
On Fri, 24 Apr 2009 14:58:48 -0500, Howard Berger <howardb at SSEC.WISC.EDU> wrote:
>I have station data of tropical cyclone best track lat, lon, vmax, and
>mean sea level pressure. Each point varies in time.
>Is it possible to draw a line connecting each point and a circle at each
>station location?
>It looks like:
>set gxout stnmark will plot the circles, but is there an easy way to
>draw a line in between each circle?
>I looked at set cmark but that didn't seem to have an option to do this.
>Thank you very much,
>Howard
Howard - I found a routine that allowed you to draw lines manually between
stations by pointing and clicking on the plot. I honestly can't remember
where I got it from, but it works very well, so here it is: and apologies
for not acknowledging the author, I found this on the web last year and
don't have my notes on where it came from.
Do your plot in GrADS, then run this script from the ga-> prompt. You can
click on a sequence of stations, then click near the bottom of the screen to
finish drawing that line. To draw another line, run the script again. Set
your line attributes as required.
* "connects the dots" -- while user points and clicks,
* this script connects the points with a line using the
* current line attributes. User must point and click
* near the bottom of the screen to quit.
*
say 'Click near bottom of the screen to quit'
'query bpos'
xold = subwrd(result,3)
yold = subwrd(result,4)
while (1)
'query bpos'
x = subwrd(result,3)
y = subwrd(result,4)
if (y<'0.5'); break; endif;
'draw line 'xold' 'yold' 'x' 'y
xold = x
yold = y
endwhile
More information about the gradsusr
mailing list