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

st: re: caption on a bar graph

From   Christopher Baum <>
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   |
An Introduction to Stata Programming   |
An Introduction to Modern Econometrics Using Stata   |

*   For searches and help try:

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