[Thread Prev][Thread Next][Index]

[ferret_users] VP_RT_MARGIN symbols label/nouser (corrected)



Hi all,

I would like to improve a small script that places a text in a viewport
with coodinates expressed as percentage of the size of the viewport

I should be able to do that by typing:

yes? set v UL
yes? ! place a "XXXXX" label centered at 50% of the width and 50% of the height of the current viewport yes? label/nouser `($VP_WIDTH)*0.5-($VP_RT_MARGIN)`,`($VP_HEIGHT)*0.5-($VP_TOP_MARGIN)`,0,0,0.2,"XXXXX"

Unfortunatelly symbols VP_RT_MARGIN and VP_TOP_MARGIN seems not set correctly.
For what I understand:

1) the symbol VP_RT_MARGIN is missing the floating digits
yes? set v UL
yes? say "($VP_RT_MARGIN) ($PPL$XORG)"
!-> MESSAGE/CONTINUE "1 1.200"
1 1.200

2) they should be equal to 0 when you change of viewport and when no plot has been drawn yet

3) they should be affected by the PPL ORIGIN command since I understand that they are synonyms of the ppl$xorg and ppl$yorg symbols*
*ORIGIN,XORG,YORG
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/appendix-b-pplus-guide/COMMAND-DESCRIPTION#_VPID_706 VP_RT_MARGIN SET VIEWPORT width of right margin(see ppl$xorg for left margin) VP_TOP_MARGIN SET VIEWPORT width of top margin(see ppl$yorg for lower margin)

For now I can do what I want using:
yes? set v UL
yes? plot i[i=1:10]
yes? label/nouser `($VP_WIDTH)*0.5-($PPL$XORG)`,`($VP_HEIGHT)*0.5-($PPL$YORG)`,0,0,0.2,"XXXXX" but I must produce a plot before (to set symbols) and that is not what I necessary want.

The lines that should run correctly
("OOOOO" and "+++++" centered in upper viewport, "XXXXX" centered in LL viewport)

$ ferret
yes? set v upper
yes? label/nouser `($VP_WIDTH)*0.5-($VP_RT_MARGIN)`,`($VP_HEIGHT)*0.5-($VP_TOP_MARGIN)`,0,0,0.2,"OOOOO"
yes? set v LL
yes? plot/nolab i[i=1:10]
yes? label/nouser `($VP_WIDTH)*0.5-($VP_RT_MARGIN)`,`($VP_HEIGHT)*0.5-($VP_TOP_MARGIN)`,0,0,0.2,"XXXXX"
yes? set v upper
yes? label/nouser `($VP_WIDTH)*0.5-($VP_RT_MARGIN)`,`($VP_HEIGHT)*0.5-($VP_TOP_MARGIN)`,0,0,0.2,"+++++"

Thanks
Patrick

--
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
Data Analysis and Visualization Engineer
ICMC - IPSL Climate Modelling Centre
--



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement