Statalist


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

Re: AW: st: Replicating catplot with twoway parea


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: AW: st: Replicating catplot with twoway parea
Date   Thu, 17 Dec 2009 02:13:11 -0800 (PST)

--- On Thu, 17/12/09, Martin Weiss wrote:
> I think Jason asked for Sergiy`s -twoway parea-, available
> from -findit twoway parea-, to replicate -ssc d catplot-.

*-------------- begin example ------------------
sysuse auto, clear
catplot hbar foreign

contract foreign
expand 2
bys foreign: gen x = foreign + cond(_n==1,-.25, .25)
list
twoway parea _freq x if foreign == 0, ///
       pattern(pattern2)  ||          ///
       parea _freq x if foreign == 1, ///
       pattern(pattern6) legend(off)  ///
       xlab(0 "domestic" 1 "foreign") ///
       xtitle("") ytitle("frequency") ///
       ylab(0(20)60) 
*----------------- end example -------------------   

To fully replicate -catplot- one would also need to 
add the -horizontal- option, which the help-file 
says is allowed, but which produces an error 
message in this case ("option horizontal not allowed").

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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