Return to Ferret FAQ


Cell edges for 3-argument shade plots


Questions:

1) How does ferret generate boundaries for the 3-argument shade command?

2) Can these boundaries instead be user specified?

Example:


There are two ways of specifying the coordinate arguments: Note the different cell boundaries in the x direction. [Output Graphic]

Explanation:

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 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 cell boundaries. The identical discussion would apply to the cell boundaries in the y direction.

For both ways of specifying the coordinate arguments, make sure that the size of the xcoord argument always matches the size of the ycoord argument.

Method:

The Ferret commands for the above plot:

     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.)



Last modified: February 14, 2001