Re: controlling font size within a title [message #7165] |
Tue, 08 October 1996 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Melissa Nischan <nischan@donald.phast.umass.edu> writes:
> I was wondering if someone could tell me how to control font size
> within a string. My problem is this: I want to have a main title on a
> map (made using map_set) with a second line underneath in a smaller,
> different font.
>
> the string I'm using is something like this, for example:
>
> title="this is the first line!c!3this is the second line"
>
> I know that the !c tells is to move down a line, and the !3 changes the
> font, but I cannot figure out how to tell to use a *smaller* font. for
> example, I'd like the first line to be 20pt, and the second line to be
> 16pt.
I don't think this can be done this way. (I realize this is a dangerous
statement in this group!) In fact, I can't see any way to control the
font size of individual characters within a string without making
them subscripts, superscripts, etc. And then the font sizes seem
to change automatically.
Since in many cases you will run out of room if you have a plot title
with two lines of text in it (i.e., the default "title space" is often
not big enough to accommodate two lines of title), I suggest another
approach.
Limit your map projection space in the window with the POSITION
keyword and save plenty of room for a title. Then put the title
and its subtitle on the plot with XYOUTS. Here is a short example
of what I mean.
MAP_SET, /ORTHO, /GRID, /CONTINENTS, $
POSITION=[0.05, 0.05, 0.95, 0.80]
XYOUTS, 0.5, 0.92, /NORMAL, ALIGNMENT=0.5, SIZE=2.0, $
'This is the First Line',
XYOUTS, 0.5, 0.85, /NORMAL, ALIGNMENT=0.5, SIZE=1.6, $
'This is the Second Line',
If you use the ISOTROPIC keyword with the MAP_SET command
it can be just a bit trickier with certain map projections
(e.g., cylindrical), but you can make the minor adjustments
necessary.
I haven't tested it, but I believe the approach above will be
equally valid if you are sending the plot to a PostScript file.
Yours,
David
--
David Fanning, Ph.D.
Phone: 970-221-0438
Fax: 970-221-4728
E-Mail: davidf@fortnet.org
|
|
|