[Thread Prev][Thread Next][Index]
Re: Hide outside labels
Hi Julien,
There's no easy answer for this in terms of Ferret commands; labeling is
set up so that
labels can be placed anywhere in the plot window.
The answer will probably be that you'll have to compute the amount of
space available
in the plot box, using symbols like PPL$XLEN, axis length in inches,
and XAXIS_MIN
and XAXIS_MAX, which are the axis endpoints in user units (e.g.
longitude). Then
you would compute the distance from your desired location to the edge of
the plot box.
The size of the text and function STRLEN would tell how much of the
label will fit, and
SUBSTRING shortens the strings as needed.
Users, does anyone do this general kind of thing? Does anyone have
scripts that compute
positions on the pages in terms of plot-axis lengths, converting between
user units and inches,
and the size of string labels? I imagine a few examples would be very
helpful.
Ansley
Julien Demaria wrote:
Ansley,
Thanks for your answer,
In fact I want use the mode ppl window off, but I need truncate cities
labels too when there are too long and has a part outside the
window... : example : at the end of your example :
label 10, 53, -1, 0, 0.12 LONGLONGLABEL
I need this because I generate labels from a big list of cities and I
cannot know if each label 'll overlap the window (depending on font,
size, ...).
Thanks,
Julien
At 18:24 30/11/2004, Ansley Manke wrote:
Hi Julien,
You don't say what command you're using to plot your symbols, but
with either
the PLOT/VS command or POLYGON command, the PPL WINDOW OFF
command will set Ferret so it doesn't "window" the data, that is,
clip it to the
edges of the plot box. Try this example:
yes? go basemap x=-60:20 y=20:80 20
yes? ppl window off
yes? let xpts = {10,15,20,22,25}
yes? let ypts = {43,55,49,43,50}
yes? plot/vs/over/nolab/color=red/sym=26 xpts, ypts
yes? let ypts = {53,65,59,53,60}
yes? go polymark poly/over/nolab/nokey/line/pal=green xpts, ypts,
,circle
Julien Demaria wrote:
Hi,
I need to display a list of cities names on my map with little cross
: when a cross is outside my map it is automatically hidden, but the
associated label is displayed...
Are there tricks to automatically hide outside labels ?
Thanks in advance,
Julien
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement