Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: RE: box and whisker plot with proportional box size?


From   Jeph Herrin <stata@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: box and whisker plot with proportional box size?
Date   Thu, 02 Sep 2010 10:48:02 -0400

Nick - thanks, I'll give it a look.

In response to Ronan, yes, it may not always be the best figure,
but sometimes it is. Perhaps more to the point, this week such figures
appears in both Lancet and New England Journal of Medicine, journals
that influence my colleagues a good bit, and hence me (to a lesser
extent).

cheers,
Jeph


On 9/2/2010 10:07 AM, Nick Cox wrote:
Yes!; but you may not like the answer:

. sysuse auto
(1978 Automobile Data)

. graph7 mpg, box by(foreign) vw

How to do this is discussed within

SJ-9-3  gr0039  . . . . . . . . Speaking Stata: Creating and varying box plots
         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
         Q3/09   SJ 9(3):478--496                                 (no commands)
         explains how to use egen to calculate the statistical
         ingredients needed for box plots and variations of box
         plots; shows the use of twoway to then create the plots

but there is no easy solution that I know. You would have to superimpose several -twoway-s to get there.

Nick
n.j.cox@durham.ac.uk

Jeph Herrin

A colleague has shown me a couple of box and whisker plots where
the width of the box (that is, the dimension that is perpindicular
to the whiskers) is proportionate to the number of observations the
box represents. I think it's a useful modification, and have been
trying to create this myself. However there seems to be no option
in -graph box- to control the width of the box.

Is there a graph type and option combination that I am overlooking
that will allow me to create box and whisker type plots while
controlling the widths of the individual boxes?


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