[Thread Prev][Thread Next][Index]
Re: how to change the Z axis ranges without change the plot?
Hi Zibiao Zhang,
you wrote : define axis/z=-50:0:-10
As Ansley suggested this defenition is not complete ==> axis name is
missing. By regridding to a new properly defined axis, you can get
the variable ploted with actual depth values insted of fractional values.
Here is a detailed example.
\ cancel mode verify
! suppose actual depth points are 0,10,20,30....100
! so that the fractions will be 0,0.1,0.2,0.3,....1
! first we will define an axis with "fractional" depth
! the /DEPTH qualifier will make the z-axis "positive=down"
define axis/z=0:1:0.1/DEPTH zfra
define axis/t=1:25:1 tax ! dummy t-axis
define grid/z=zfra/t=tax grd ! grid with t & z axis
! let us get some data with z-axis "zfra". function randu generates
! pseudo-random values
let var_fr = randu(Z[G=grd]) + randu(T[G=grd]) ! in your case var_fr =
your variable
! with fractional z-axis
! now we can define a depth axis which will have actual depth values
! we know depth at which depth fraction is 1 is 100 ..hence z-axis
! low, high & delta are
! 0*100 = 0, 1*100 = 100 & 0.1*100 = 10
define axis/z=0:100:10/DEPTH/units=meters zax
!now we can directly regrid our var_fr to this new axis as "var"
! @asn will blindly associate the varialbe values to the new z values
! (the number of depth points in both z-axes are the same)
! you can use this kind of an axis even if your fractional axis is
! "positive=up"
let/title="var_fr with actual depth"/units="meters" var = var_fr[GZ=zax@asn]
contour var
Hope this helps
With Regards
Jaison
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?
>
--
___________________________________________________
Jaison Kurian
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3942505
+91-80-3600450
Fax:+91-80-3600865
___________________________________________________
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement