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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: AW: Making scatterplot instead of box plot... |

Date |
Fri, 15 May 2009 00:15:22 +0200 |

<>

************* sysuse bpwide, clear //before graph box bp_before,/* */ over(sex) name(first, replace) /* */ nodraw scatter bp_before sex, /* */name(second, replace) nodraw //after graph box bp_after,/* */ over(sex) name(third, replace) /* */ nodraw scatter bp_after sex, /* */name(fourth, replace) nodraw //combine 'em gr combine first second third fourth ************* HTH Martin _______________________

To: <statalist@hsphsun2.harvard.edu> Sent: Thursday, May 14, 2009 11:58 PM Subject: Re: st: AW: Making scatterplot instead of box plot...

Dear Martin,Thanks for your help. I want complete representation of all the data setin the graph as scatter plot with added indicator bar showing the mean andsd of each scatter plot.I found your idea of combining box plot and graph bar in a single figurealso working. Then, my question is:could you help me with making box plot and scatter plot (instead of barchart) in a single figure?Thanks, Amr --- On Fri, 5/15/09, Martin Weiss <martin.weiss1@gmx.de> wrote:From: Martin Weiss <martin.weiss1@gmx.de> Subject: Re: st: AW: Making scatterplot instead of box plot... To: statalist@hsphsun2.harvard.edu Date: Friday, May 15, 2009, 12:45 AM <> You can stack inside the -graph bar- *** graph bar (mean) bp_before bp_after (sd) bp_before bp_after, over(sex) stack *** but apart from that, can you rephrase your request? I really do not get what you want... HTH Martin _______________________----- Original Message -----From: "Amr Al Sayed" <asyoussef@yahoo.com>To: <statalist@hsphsun2.harvard.edu> Sent: Thursday, May 14, 2009 11:27 PM Subject: Re: st: AW: Making scatterplot instead of box plot... > Thanks Martin, > It worked! However, I want to show the data as scatter plot with all the > values are represented as dots plus an indicator bar beside every scatter > blot to show the mean and sd. If it is not possible, then I can use your > idea of combining box plot with scatter plot as the 2nd graph to the > right. > So, could you help with making scatter plot instead of graph bar (on the > 2nd graph) > OR to add the sd value to the top of each graph bar as a whiskers? > > Best regards, > Amr > > --- On Thu, 5/14/09, Martin Weiss <martin.weiss1@gmx.de> wrote: > >> From: Martin Weiss <martin.weiss1@gmx.de> >> Subject: st: AW: Making scatterplot instead of box plot... >> To: statalist@hsphsun2.harvard.edu >> Date: Thursday, May 14, 2009, 11:35 PM >> >> <> >> >> Not sure how a scatter plot can have bars, but here is >> something you could >> try: >> >> >> ************* >> sysuse bpwide, clear >> >> graph box bp_before bp_after,/* >> */ over(sex) name(first, replace) /* >> */ nodraw >> graph bar (mean) bp_before bp_after /* >> */(sd) bp_before bp_after, over(sex)/* >> */ name(second, replace) nodraw >> >> gr combine first second >> ************* >> >> >> >> HTH >> Martin >> >> >> -----Ursprüngliche Nachricht----- >> Von: owner-statalist@hsphsun2.harvard.edu >> [mailto:owner-statalist@hsphsun2.harvard.edu] >> Im Auftrag von Amr Al Sayed >> Gesendet: Donnerstag, 14. Mai 2009 22:21 >> An: Statalist >> Betreff: st: Making scatterplot instead of box plot... >> >> Dear all, >> >> I have simple problem with transforming a box plot of two >> continuous >> variables (y1 and y2) measured over 4 time points (x, with >> x is a >> categorical variable 0,1, 2, 3) into scatter graph with bar >> indicating their >> means and standard deviation. The rationale is a more >> informative way of >> data display. >> >> I used the stata command (Stata 9.2): graph box y1 y2, >> over(x) >> >> Could you help me to display my data as scatterplot instead >> of blind box? >> >> Regards, >> Amr >> >> >> >> >> * >> * 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/ >> > > > > > * > * 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/* * 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/

**Follow-Ups**:**Re: st: AW: Making scatterplot instead of box plot...***From:*Sam Norton <samjnorton@googlemail.com>

**References**:**Re: st: AW: Making scatterplot instead of box plot...***From:*Amr Al Sayed <asyoussef@yahoo.com>

- Prev by Date:
**Re: st: AW: Making scatterplot instead of box plot...** - Next by Date:
**RE: st: "time ratios" and "hazard ratios"** - Previous by thread:
**Re: st: AW: Making scatterplot instead of box plot...** - Next by thread:
**Re: st: AW: Making scatterplot instead of box plot...** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |