Statalist


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

st: RE: catplot


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: catplot
Date   Fri, 16 Jan 2009 18:12:29 -0000

-catplot- is a user-written program from SSC. For examples, see 

SJ-4-2  gr0004  .  Speaking Stata: Graphing categorical and
compositional data
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q2/04   SJ 4(2):190--215                                 (no
commands)
        discusses graphical possibilities for categorical and
        compositional data

which is accessible to all. 

Martin gave a good example, but how did he know? 

1. The help for -catplot- gives a pointer to graph options, including
this one. 

2. -viewsource catplot.ado- would open up a view on the code, showing
you that the -ytitle()- option is being used here. 

Martin's example is not the only possible. I suggest that -- setting
aside the title detail -- 

catplot bar rep78 foreign, percent(foreign)

gives a better graph. Note that 

catplot bar rep78, over(foreign) percent(foreign)

is equivalent. The latter form is better if you want start tucking
suboptions inside the -over()- call. 

What is essential is that whatever is regarded as the categorical
response variable is named to the left, in the varlist. 

"cat" here indicates furry felicity. 

Nick 
[email protected] 

Martin Weiss 

sysuse auto, clear
catplot bar rep78, by(foreign) percent(foreign) yti("My new title")

[email protected]

Is it possible to change the "percent of category" title on a catplot  
to something else?


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index