Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: colors in boxplots

From   "Scott Merryman" <>
To   <>
Subject   st: RE: colors in boxplots
Date   Fri, 7 May 2004 22:21:56 -0500

You need to add the asyvars option.

For example

. sysuse auto
(1978 Automobile Data)

. graph box mpg, medtype(line) over(rep)   asyvars

will produce 5 boxes, each with a different color.

Hope this helps,

-----Original Message-----
[] On Behalf Of Donald Spady
Sent: Friday, May 07, 2004 1:51 PM
Subject: st: colors in boxplots

Dear Statalisters

I want to create a graph consisting of 5 sets of boxplots, with each set 
containing 3 boxplots.  I can do this but I want to differentiate each of 
the 3 boxplots within a set.  I want to have different colors (preferably 
hatching and stuff but that is not possible at present I guess) so that 
they will stand out as separate in a black and white image.  My commands 
are below, but when I put in the commands for the boxplot color etc, it 
only uses the first one, in this case box(1, bfcolor(ltbluishgray).  All 
the boxes are this color.  Is there any way to have different colors.

Many thanks in advance.

graph box eia, medtype(line) over(vacgroup, axis(off)) over(time) box(1, 
bfcolor(ltbluishgray) blcolor(black)) box(2, bfcolor(ltbluishgray) 
blcolor(black)) box(3, bfcolor(white) blcolor(black)) ytitle(EIA, 
size(medium)) title(Time, position(6))

Don Spady

Donald Spady

Department of Pediatrics
2C3.92 WMC, University of Alberta
Edmonton, Alberta, Canada
T6G 2R7


Nature has no reset button. 

*   For searches and help try:

*   For searches and help try:

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