[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: spmap legend title

From   "Friedrich Huebler" <>
Subject   Re: st: spmap legend title
Date   Fri, 6 Jul 2007 11:12:25 -0400


Thank you, the -bexpand- option helps but my title is so long that the
legend border cuts through the text. You can see what I mean with the
modified example 3b from the -spmap- help file. I made the title
longer and added a line around the legend.

. use "Italy-RegionsData.dta"
. spmap using "Italy-RegionsCoordinates.dta", ///
id(id) diagram(variable(relig1 relig2 relig3) ///
xcoord(xcoord) ycoord(ycoord) legenda(on)) ///
legend(region(lcolor(black) fcolor(white)) ///
title("Religious orientation in Italy by region", ///
size(*0.5) bexpand justification(left)))

The legend title can be written in two lines with -title("Religious
orientation" "in Italy by region")- and the text can be made smaller
but I would like to keep the title in one line at the same size. Can
the border be drawn around the entire legend, including the long


On 7/6/07, Maurizio Pisati <> wrote:
Dear Friedrich,
if I correctly understand your question, I think example 3b in the -spmap-
help gives you a solution. The relevant suboption is:

legend(title("Title", bexpand justification(left)))


At 00.11 06/07/2007, you wrote:
>-spmap- is a module to draw maps from SSC. By default, -spmap- legend
>titles are placed above the text that is to the right of the legend
>symbols. This leaves an empty space above the legend symbols. How can
>I place the legend title in the upper left corner of the legend?
>The -legtitle- option does not appear to accept anything but a string
>with the legend title. For example, -legtitle("Title", span)- returns
>this error message:
>, not an integer, option order() ignored
>I also tried omitting -legtitle- and specifying a legend title with
>-legend(title("Title", justification(left)))- but this places the
>title too far to the left.
>Which other options can I try?
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index