[Thread Prev][Thread Next][Index]
Re: cell edges for 3-argument shade
Hi Keith,
I'm glad you asked this question, because it points us to an omission of this
topic in the documentation (which we will fix - thx).
In the 3-argument syntax you specify
yes? SHADE values, xcoords, ycoords
Say
nVx - is the size of the "x" dimension of the values argument
nCx - is the size of the "x" dimension of the coordinate arguments
If nCx = nVx then the xcoords argument is presumed to give the locations of
the points in the values argument and (as you say), the boundaries between
points are computed to be the midpoints.
However, if nCx = nVx + 1 then the xcoords argument is presumed to give the
locations of the *boundaries* -- exactly the type of control that I think you
are looking for.
Here's a simple example (plot attached):
yes? set view upper
yes? shade i[i=1:5]+j[j=1:5],i[i=1:5]+0*j[j=1:5],0*i[i=1:5]+j[j=1:5]
yes? set view lower
yes? shade i[i=1:5]+j[j=1:5],i[i=1:6]+0*j[j=1:5],0*i[i=1:6]+j[j=1:5]
You'll note that in the upper panel that X cell boundaries are at 1.5, 2.5,
... (the midpoints of the xcoord argument), whereas in the lower panel they
are at x=1, 2, 3, ... (the values of the xcoord argument.)
- steve
P.S. Make sure that the size of the xcoord argument always matches the size of
the ycoord argument.
==============================
Keith Lindsay wrote:
> Greetings,
>
> I have 2 questions. The short versions are :
>
> 1) How does ferret generate boundaries for the 3-argument shade command?
>
> 2) Can these boundaries instead be user specified?
>
> When a 3-argument shade command is issued, say for data on a curvilinear
> grid, it appears that ferret is internally generating the boundaries or
> edges of the 'cells'. How are these cell edges are generated? I cannot
> find it documented in the Users Guide. I'm guessing it is a generalization
> of what ferret does for rectilinear grids, which is to use midpoints of
> the corresponding dimension variables, which leads to my next question.
>
> For rectilinear grids, the 'midpoint technique' can be overridden with the
> use of dimension edges. Is there a generalization of this that allows a
> user to specify the edges for the 3-argument shade command?
>
> Thanks,
> Keith
>
> ************************************************************************
> Keith Lindsay http://www.cgd.ucar.edu/oce/klindsay/klindsay.html
> email: klindsay@cgd.ucar.edu phone: 303-497-1722 fax: 303-497-1700
--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement