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]

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


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: box and whisker plot with proportional box size?
Date   Thu, 2 Sep 2010 15:07:04 +0100

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index