define independant data set
Charles Seman
Charles.Seman at NOAA.GOV
Wed Apr 29 13:49:02 EDT 2009
Bernd,
One idea is to try ftp://grads.iges.org/grads/examples/xyplot.gs
which does a plot of "y" vs. "x"
Chuck
Bernd Becker wrote:
> Hello,
>
> this is an odd question:
>
> can one define a data set in grads independent from any external data
> set?
>
> How do you:
>
> define x='1 2 3 4 5 6 7 8 9'
> define y=x*x
>
> d y
>
> and get an y ver. x line plot ?
>
>
> The background:
>
> I compiled event statistics by mask and const,
> count some numbers at individual grid points,
> constructed a curve, or at least the vector for it
> and now I want to plot it.
>
> I can draw a line, scaling the numbers to the plot window.
> That looks really bland.
> I also like to get appropriate axis and other nice bits.
>
> Any ideas how to do that?
>
> t = 0
> sum = 1
> scalex = 6.5/32.
> scaley = 5.5/1.
> xstr=''
> ystr=''
> linestr=''
> while ( t <= 32 )
> xstr= xstr ' ' t ' '
> ystr= ystr ' ' cdf.t ' '
>
> xx = 1 + t* scalex
> yy = 1 + cdf.t* scaley
> linestr= linestr' ' xx ', ' yy ', '
>
> t = t + 1
> endwhile
>
> * plot cdf
>
> say linestr
> 'draw line 'linestr
>
> cdf.t are numbers [ 1, 0 ] over 32 steps.
>
> --
> Bernd Becker The Monthly Outlook
> Met Office FitzRoy Road Exeter Devon EX1 3PB United Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> E-mail:bernd.becker at metoffice.com - http://www.metoffice.com
>
--
Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.
********************************************************************
Charles Seman Charles.Seman at noaa.gov
U.S. Department of Commerce / NOAA / OAR
Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547
201 Forrestal Road fax: (609) 987-5063
Princeton, NJ 08540-6649 http://www.gfdl.noaa.gov/~cjs/
********************************************************************
"The contents of this message are mine personally and do not necessarily
reflect any position of the Government or NOAA."
More information about the gradsusr
mailing list