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

st: wrapping title with by option

From   Maarten buis <>
Subject   st: wrapping title with by option
Date   Thu, 19 Jul 2007 21:38:00 +0100 (BST)

I was trying to help these guys by
providing them with Stata code for some of their graphs (they requested
that here:

Anyhow I got already stuck on the first graph on what seems to be a
minor thing, the wrapping of the subtitles. I was trying to recreate
that graph with the -by()- option, but couldn't get the subtitles to

The subtitles are obtained from the value labels, and titles wrap by
feeding them two (or more) strings, so thought lets create value labels
with multiple strings, which is possible by surrounding them with
compound quotes. However, for once I think that the compound quotes
work too well, because when I create the graph they are treated as one
string. I realize that this is good behaviour, but it doesn't solve my
problem of how to wrap titles with the -by()- option. Does anyone have
any thoughts?

*--------------- begin example ----------------
sysuse auto, clear

label defin foreign 0 `""realy long" "title""' /*
                */  1 `""another" "long title""'
label value foreign foreign
twoway scatter pri mpg, by(foreign)
*---------------- end example ------------------


Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
*   For searches and help try:

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