[Thread Prev][Thread Next][Index]
Re: Axis label on contour plot using reshape function
Hi Steve,
I think your querry went unnoticed...anyway here is few
references to some old mails in the archive & a quick example,
for customorizing labels.
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg01483.html
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg00962.html
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg01081.html
For details of commads like "label", "ppl xlab".. and qualifiers like
"title" please refer Ferret usermanual.
Hope This Helps
With Regards
Jaison
!-------example.jnl----------------------------
! this example uses the navy wind dataset available with
! Ferret distribution
set data monthly_navy_winds.cdf
let u_box = uwnd[X=50E:100E@AVE,Y=-5:5@AVE] ! time series
define axis/t=1982:1992:1/units=years tyr ! 11 years
define axis/z=1:12:1/units=months zmon ! 12 months
let out_grid = z[gz=zmon] + t[gt=tyr] ! dest. grid
let u = RESHAPE(u_box,out_grid) !
! give proper title and units (if you want proper title at
! default location)
set var/title="Zonal Wind Speed - Av. over 50:100E & 5S:5N"/\
units="m/s" u
fill u
message
! to change title & axis labels on the fly
!
fill/title="u (m/s)"/set u
ppl xlab "Year"
ppl ylab "Month"
ppl fill
message
! to get axis labels & title at desired locations
! refer user manual for "label" command syntax
fill/nolab u
label 1981,6,0,90,0.15 MONTHS
label 1987,-0.5,0,0,0.15 YEARS
label 1987,13,0,0,0.20 Aha My Wind (m/s)
!-----------end of example.jnl----------------------
On Fri, 15 Oct 2004, Steve Knox wrote:
> I'm using the reshape function and contour to plot months vs. years.
> The contour plot has y-axis label is "Z" and the x-axis is "T".
> I want to change the x and y axis labels from the defaults.
> How can I do that?
>
> set region/x=-136.0:-130.0/y=27.0:30.0
> use tmin
> DEFINE AXIS/T=1901:1910:1 tyear
> DEFINE AXIS/Z=1:12:1 zmonth
> LET out_grid = Z[GZ=zmonth]+T[GT=tyear]
> LET my_reshaped = RESHAPE(tmp[x=@ave,y=@ave,t=15-jan-1910:15-dec-1902],
> out_grid)
> contour/fill my_reshaped
>
> Thanks!
>
>
--
___________________________________________________
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