[Thread Prev][Thread Next][Index]
Re: [ferret_users] Shifting major tics?
Hi Ryo,
Here is a demo that shows one way to get major tics and axis values
at 20E, 40E, 60E in a situation
where the defaults would place them elsewhere:
def axis/x=10:70:1/units=longitude xax ; def
axis/y=30:60:1/units=latitude yax
def grid/x=xax/y=yax grd ; let v=x[g=grd]+y[g=grd]
shade/nolab/set v ; ppl xaxis,10.01,69.99,10 ; ppl shade
The "trick" used is to limit the x-axis to exclude the unwanted end
points. If you just wanted to exclude labels at the end points (but
wanted the defaults to apply inside) you could use:
shade/nolab/hlim=10.001:69.999 v
Note that in the first version there are unlabeled major tics at 30E and
50E. This is because the default is to label every second major tic.
To make these go away you would increase the x-axis increment to 20 and
use the "ppl axlint" command:
shade/nolab/set v ; ppl xaxis,10.01,69.99,20 ; ppl axlint,1 ; ppl shade
... and to add minor tic marks at one degree intervals you could use
"ppl axnmtc" :
shade/nolab/set v ; ppl xaxis,10.001,69.999,20 ; ppl axlint,1 ; ppl
axnmtc,19 ; ppl shade
The other way to go of course is to extend what you did with a repeat
loop of LABEL commands to create tics also:
ppl axnmtc,0 ! to undo the minor ticing specified above
ppl axset,1,0,1,1 ; shade/nolab v ! create plot without the lower axis
repeat/i=20:60:20 (label `i` 27.5 0 0 0.12 @sr`i`#E) ! note #
inserts the degree symbol
plot/o/vs/nolab/line=1 {9.5,70.5},{29.5,29.5} ! add an
unticed line
repeat/i=10:70:5 (label `i` 29.5 0 180 0.1 @sm35) ! add tics
The benefit of using plotmark SM35 upsidedown (the 180) is that it saves
the trouble of figuring out the y-value.
Good luck,
Mick
----------
Ryo Furue wrote:
Hi Ferret users,
I'm wondering how to shift major tics and numeric labels.
My plotting domain is from 10E to 70W, but I want the numeric
labels and associated major tics at 20E, 40E, 60E, etc.
(I know this isn't a good style in a normal situation,
but please grant that I really need it.)
I looked at ppl parameters like AXATIC and friends
but couldn't find an obvious way to accomplish what I need.
Since I couldn't think of anything better, I used
the LABEL command in a REPEAT statement to place the
numeric labels. But, I got stuck on how to place major
tics at the corresponding locations. I'd appreciate any help.
Regards,
Ryo
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement