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

Hamish hamish_nospam at yahoo.com
Tue Mar 23 07:44:34 EST 2004

> 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:
> http://moritz.homelinux.org/misc/bad_legend.png
> 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.

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..

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

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

I also see one of the recent d.frame fixes isn't drawing correctly..mph.


More information about the grass-dev mailing list