Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: caption on a bar graph


From   Christopher Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: caption on a bar graph
Date   Mon, 19 Oct 2009 17:08:49 -0400

<>
The code that Dorothy provided has two problems---the title is partially chopped off above the graph, and the caption collides with the category labels.

The problem obviously has to do with the legend. If you comment out the legend definition, the default legend works fine. Likewise if you change cols(1) to cols(2), the legend is all there and the above problems disappear. So what is needed, it seems, is some way to make the single-column legend smaller.

In fact this also avoids the problem:

legend(cols(1) span  position(3) /* stack */ region(lcolor(white))  ...

but takes up too much horizontal real estate, perchance.

There is obviously something wrong with the mechanism that figures out how tall the graph must be, given the legend. Suppressing the xsize and ysize parameters does not help.

Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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