[Thread Prev][Thread Next][Index]

Re: how to change the Z axis ranges without change the plot?



On Tue, 6 Apr 2004, Zibiao Zhang wrote:
> Hi, I plotted a contour of temperature with depth and time, however
> my depth is in fraction of total depth.
> how can I change the z axis to real depth without change the plot itself?
> also when I use define axis/z=-50:0:-10, it gave me the error:
> invalid command: defien what name?
> anybody knows what happens?

Hi,
	If you typed in "define axis/z=-50:0:-10 zax" then ferret is
perhaps complaining about the "delta" of -10.  It ought to be +10 to
get from -50 to 0. So what you might need is
"define axis/z=-50:0:10 zax"

	The contouring of the data to show the actual depth, rather
than the fractional depth could be done in several ways.

1) define a new depth axis to rescale the fractions to true depths
2) omit the fractional value labels on the depth axis and add them
   later as labels, or
3) omit the entire depth axis and add a true depth axis using the
   ppl %label command.

Of these 1) seems the best. Here is a demo.  In your real situation
the grid "grdf" would come from the dataset perhaps and you want
to replace the fractional depths with actual depths for some known
water depth.

Hope it helps,
Mick

!--------------------------------------------------------------
def axis/x=1:10:1 xax
def axis/z=-0.9:-0.1:0.1 zaxf ! the fractional axis
def grid/x=xax/z=zaxf grdf   ! the fractional grid
let vf = x[g=grdf]*z[g=grdf] ! a variable to be contoured

set view upper ; fill vf     ! plot with fractional depths

let truedepth = 80 ! the water is really 80 meters deep
let zf = z[g=grdf] ! the depths represented as fractions

! now we can define the depths in meters corresponding to the
! fractions and use that to make a new axis and grid

def axis/z/name=zax/from_data truedepth*zf
def grid/like=grdf/z=zax grd ! use other axes but substitute new zax
let v = vf[g=grd,gz=@asn]    ! assign the data to the new grid
set view lower ; fill v      ! plot with depths in meters




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement