[Thread Prev][Thread Next][Index]

Re: 2d-Plot with symbols



Nicolas Schneider wrote:

> I have 2-dimensional (x-y) data of temperature differences. I would now 
> like to draw a 2D-plot with symbols instead of filled grid boxes 
> (SHADE). That means that instead of a filled grid box, I would like to 
> draw a symbol reflecting the value in that grid box. Positive 
> temperature differences should be drawn with filled circles with the 
> size depending on the magnitude of the temperature difference. 
> Contrastingly, negative temperature differences should be drawn with 
> open circles, again depending on the magnitude of the difference.
> 
> Is this possible with ferret? Where should I look for? Under SHADE 
> commands or PLOT commands?

The following does approximately what you want. It's not very pretty,
I plot the data twice to distinguish between open and closed
polygons. I find it really looks better if you only use filled
polygons and let the color distinguish between negative and positive,
but that's up to you. Look for the POLYGON command in the ferret
manual for further options and explanation. Producing a circle instead
of a diamond is left as an excercise for the reader :-)

Hope that helps,
     Hein Zelle


use etopo120
set region/x=40:120 /y=-20:40
set window/aspect=`60/80`:axis
palette light_centered
go basemap

let xdiamond = tsequence({-1,0,1,0})
let ydiamond = tsequence({-0,1,0,-1})
let size1 = if (rose gt 0) then 0.5+abs(rose/10000) else 0
let size2 = if (rose lt 0) then 0.5+abs(rose/10000) else 0

repeat /i=10:50:2 (repeat /j=26:66:2 (polygon /key /nolab /fill /levels=(-8000,8000,1000) /overlay x[g=rose]+xdiamond*size2, y[g=rose]+ydiamond*size2, rose ; ppl shaset reset))

repeat /i=10:50:2 (repeat /j=26:66:2 (polygon /key /nolab /line /levels=(-8000,8000,1000) /overlay x[g=rose]+xdiamond*size1, y[g=rose]+ydiamond*size1, rose ; ppl shaset reset))



>-----------------------------------------------------------------<
    Hein Zelle
    Dept. of Oceographic Research
    KNMI, The Netherlands
    work:        zelle@knmi.nl     http://www.knmi.nl/~zelle
    private:     hein@icce.rug.nl  http://www.icce.rug.nl/~hein
    Phone:       +31 (0)30 2206704
>-----------------------------------------------------------------<
-------------------------------------------------------------- 

Zie ook/see also: http://www.knmi.nl/maildisclaimer.html 
 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement