On 7/6/07, Friedrich Huebler <[email protected]> wrote:
Maurizio,
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
title?
You could use the -margin()- suboption within the -region()- option:
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) margin(0 4.8 0 0) fcolor(white)) ///
title("Religious orientation in Italy by region", ///
size(*0.5) bexpand justification(left)))
Scott
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/