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

Re: st: changing appearance of boxplots

From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: changing appearance of boxplots
Date   Sat, 23 Jul 2005 21:01:10 +0200

You want to make a boxplot with two groups, in one group the box should be 
black with a white median line, in the other white with a black median 
line (right?).
That can't be done, as far as I can see. With -medtype(cline)- you can let 
-medline(lcolor(black))- determine the color of all median lines, but you 
cannot make them different.
But could you use this suggestion, making median lines black, and let the box
in one group be white, in the other gray?
Good luck


graph box avgo2                          ///

  ,                                      ///

  over(cs1) over(cage) asyvars           ///

  medtype(cline) medline(lcolor(black))  ///

  box(2, bcolor(gs8) blcolor(black))     ///

  box(1, bfcolor(white) blcolor(black))  ///

  boxgap(10)                             ///

  ytitle("SpO2")                         ///

  b2title("Minutes")                     ///

  legend(cols(1) position(5) ring(0) lab(1 "Vaginal delivery") lab(2 "Cesarean delivery")) 


Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:  +45 8942 6090 
Phone, home:  +45 8693 7796 
Fax:          +45 8613 1580 
E-mail:       [email protected] 

*   For searches and help try:

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