Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: CATPLOT and "ytitle" option


From   "David Radwin" <dradwin@mprinc.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: CATPLOT and "ytitle" option
Date   Wed, 2 Feb 2011 14:04:41 -0800 (PST)

I think you want to specify this

    ytitle("`: variable label my_variable2'")

or perhaps something like this

    ytitle("my_variable2 - `: variable label my_variable2'")

which uses the extended macro function (-help extended_fcn-) for showing
the label of a variable.

Also, it is good form on Statalist to specify the author of a user-written
program like -catplot- and where it is available, which in this case is
Nick Cox and SSC. (I made the same mistake once. Perhaps it is because
-catplot- is so indispensible to some of us that it seems like an official
Stata command.)

David
--
David Radwin
Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Lucie Vlach
> Sent: Wednesday, February 02, 2011 12:30 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: CATPLOT and "ytitle" option
> 
> Hello all!
> 
> I need to plot my data, using catplot (works really well), but I would
> like the "ytitle" to display my already existing variable label(s) (and
> possible variable name, but label would be great).
> I tried everything, but cannot get this right. Is there a way?
> I know I can type in my own titles, but to speed this up, I would like
to
> display what I already have associated with each variable for a title.
> 
> This is what I am using now:
> 
> catplot   my_variable1, percent (my_variable2) by (my_variable2)
ysize(3)
> ytitle (My Title) blabel (bar, format (%4.1f))
> 
> Thank you!
> 
> Lucie

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index