Statalist


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

st: Re: Boxplot w/ 2nd y-axis and mean overlay


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: Boxplot w/ 2nd y-axis and mean overlay
Date   Sat, 13 Jun 2009 11:50:43 +0200

<>

"Additionally, I'd like to add the mean to the boxplot.  Is there a way
to do so?"

***
sysuse bplong, clear
su bp, mean
graph box bp, over(sex) ///
yli(`r(mean)') yla(`r(mean)')
***


HTH
Martin
_______________________
----- Original Message ----- From: "Michael Sorice" <[email protected]>
To: <[email protected]>
Sent: Saturday, June 13, 2009 12:04 AM
Subject: st: Boxplot w/ 2nd y-axis and mean overlay


I've created a boxplot summarizing three variables over 3 groups. The command line looks like: graph box A1 A2 B1, over(group)
Variables A1 & A2 are on the same scale but B1 is on a larger scale.
Is there a way to put B1 on a 2nd y-axis? I'd like them all on one plot and readable. I can only find a 2nd y-axis option for the "twoway" command.

Additionally, I'd like to add the mean to the boxplot. Is there a way to do so?

Thanks,
Mike Sorice






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