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: RE: CATPLOT and "ytitle" option


From   Lucie Vlach <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: RE: CATPLOT and "ytitle" option
Date   Wed, 2 Feb 2011 15:26:32 -0700

Thank you very much David!
Fantastic... Both suggestions work just great. Exactly what I needed. This saved me tons of time.
Many thanks to Nick Cox for -catplot-! (I will certainly credit next time).

Lucie


________________________________________
From: [email protected] [[email protected]] On Behalf Of David Radwin [[email protected]]
Sent: February 2, 2011 3:04 PM
To: [email protected]
Subject: st: RE: CATPLOT and "ytitle" option

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: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Lucie Vlach
> Sent: Wednesday, February 02, 2011 12:30 PM
> To: [email protected]
> 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/

This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.

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