Statalist


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

Re: st: Re: wrapping title with by option


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Re: wrapping title with by option
Date   Fri, 20 Jul 2007 20:05:57 +0100 (BST)

Thanks for that trick.
Maarten

--- Michael Blasnik <[email protected]> wrote:
> ...
> Although not exactly a "solution", you can directly edit the by-graph
> titles 
> using the gr_edit command:
> 
>  gr_edit .graphs[1].subtitle.text[1]=`"This is by group 1"'
> 
> will change the 1st line of the title of the 1st by-group graph
> 
> 
>  gr_edit .graphs[2].subtitle.text[2]=`"Hi There graph 2 line 2"'
> 
> will add a second line (text[2]) to the title of the second by-group
> graph 
> (graphs[2])
> 
> So, it wouldn't be too hard to write an ado that would semi-automate
> this 
> process to get multi-lined by-graph titles -- either by supplying a
> quote 
> delimited list of titles or perhaps through some use of label
> languages(?). 
> However, I'd have to agree with posts here that the graph is not very
> good as is 
> and I'd also say that I prefer to keep shorter titles when working
> with 
> multiples.
> 
> Michael Blasnik
> 
> ----- Original Message ----- 
> From: "Maarten buis" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, July 19, 2007 4:38 PM
> Subject: st: wrapping title with by option
> 
> 
> >I was trying to help these guys http://tables2graphs.com/doku.php by
> > providing them with Stata code for some of their graphs (they
> requested
> > that here:
> >
>
http://www.stat.columbia.edu/~cook/movabletype/archives/2007/07/tables2graphsco.html
> > )
> >
> > 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
> > wrap.
> >
> > 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
> >
> 
> *
> *   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/
> 


-----------------------------------------
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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
*
*   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/



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