[GRASS5] GRASS 5.3: d.legend font size problem

Moritz Lennert mlennert at club.worldonline.be
Tue Mar 23 09:09:30 EST 2004

Hamish said:
>> I have a problem with the automatic adjustment of font size in
>> d.legend. Using frames, I created the following display:
>> http://moritz.homelinux.org/misc/good_legend.png
>> where everything displays fine. But when I try to reduce the width of
the frame containing the raster legend, I get the following result:
>> In an (old) thread
>> (http://thread.gmane.org/gmane.comp.gis.grass.devel/154) Hamish said
"the maxfontsize= functionality is somewhat unneeded now that font size
will auto-adjust if it is too large for the window", but this does not
seem to work in my case...
>> Any hints ?
> Auto-scaling text is only implemented for categorical legends.
> I'll look into getting it working for gradient legends too.
> Legend text is generally controlled by the height of the legend box.

Yes, it scales if I change the vertical size:

> Another option is to use the use= option. ;) This will make a category
legend & thus auto-scale the text. From the look of your map, this may
be suited to your data..

Even though it might not seem so, there are 589 categories in this map, so
the use option is not very practical. (Actually this map is complete
nonsense, I'm just using it for a proof of concept)

> BTW, have you tried the new horizontal legends? Maybe that is more
appropriate for your map?

How do I create those, I didn't find it obvious to grasp that from the man
page ?

> Also, your "good" legend seems to have some label cruft ")" in it; try
using the -v flag.

Yup, works, thanks !


More information about the grass-dev mailing list