[Thread Prev][Thread Next][Index]
Re: [ferret_users] Viewport : Relation between size and boundaries
Hi Jaison,
This is because of how Ferret automatically sets up the margins. Do you
want the axes to line up, with the axes of the smaller viewport matching
the lower right corner of the larger one? This will be much easier if
you use DEFINE VIEWPORT/AXES. You'll need to decide what space if any
to reserve for the axes, but then you're home free. For instance,
! Remove tics and Labels
ppl tics 0 0 0 0 0 0
ppl axlsze 0, 0
! A big viewport
let xlo = 0.1; let xhi = 0.9
let ylo = 0.1; let yhi = 0.9
define view/AXES/xlim=`xlo`:`xhi`/ylim=`ylo`:`yhi` vbig ; set
view vbig
fill/nolab/nokey/pal=white I[I=1:10]*J[J=1:10]
! A small one on lower right corner
let fgn_xlo = `xhi-0.25`
let fgn_xhi = `xhi`
let fgn_ylo = `ylo`
let fgn_yhi = `ylo+0.25`
define view/AXES/xlim=`fgn_xlo`:`fgn_xhi`/\
ylim=`fgn_ylo`:`fgn_yhi` vsmall
set view vsmall
fill/nolab/nokey/pal=white I[I=1:10]*J[J=1:10]
Jaison Kurian wrote:
Hi,
I want to make two viewports, a big one and a smaller one such
that the smaller one should just fit inside at the lower-right
corner of the bigger one. A direct attempt goes like this ...
! Remove tics and Labels
ppl tics 0 0 0 0 0 0
ppl axlsze 0, 0
! A big viewport
define view/xlim=0.0:1.0/ylim=0.0:1.0 vbig ; set view vbig
fill/nolab/nokey/pal=white I[I=1:10]*J[J=1:10]
! A small one on lower right corner
let fgn_xlo = `($VP_XHI)-0.25`
let fgn_xhi = `($VP_XHI)`
let fgn_ylo = `($VP_YLO)`
let fgn_yhi = `($VP_YLO)+0.25`
define view/xlim=`fgn_xlo`:`fgn_xhi`/\
ylim=`fgn_ylo`:`fgn_yhi` vsmall
set view vsmall
fill/nolab/nokey/pal=white I[I=1:10]*J[J=1:10]
Now the smaller one is gone outside the boundaris of bigger one !!!
1. Why should the rightern boundaries be different for the bigger
one and smaller one (i mean ..what is the advantage over
size independant boundary) ??. What is the relation between
viewport size and its boundaries ??
2. How to fit the smaller one to the lower-right corner of bigger
one ?
I want the script to calculate the values needed to define the
smaller viewport, **STRICTLY** based on the information available
in ppl symbols about the first drawn bigger view port.
3. If there is an /AXES qualifier to "define viewport", then the
values returned by pplus symbols like $VP_XHI, $VP_XLO will be
different than the values supplied to the define command.
What is the relation between these given value and value
available
in pplus symbols ?
Regards,
Jaison
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement