Statalist


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

AW: AW: st: Replicating catplot with twoway parea


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: AW: st: Replicating catplot with twoway parea
Date   Thu, 17 Dec 2009 11:16:38 +0100

<> 


Sergiy may also want to note that his syntax diagram says "twoway area yvar xvar [if] [in] [, options]" which should be -parea-, I think...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Donnerstag, 17. Dezember 2009 11:13
An: [email protected]
Betreff: Re: AW: st: Replicating catplot with twoway parea

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


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