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

Re: st: Additional lines on histogram

To   <>
Subject   Re: st: Additional lines on histogram
Date   Fri, 18 Nov 2005 16:06:36 +0100

Eric wrote:
I am generating a histogram but want to superimpose additional lines for
certain values on the x-axis. However, the additional line is basically
hidden behind one of the histogram bars, only appearing from the top of
the bar to the top of the graph. Is there a way to bring the additional
line to the top so that it is drawn on top of the histogram?
You are right that an xline() becomes hidden behind the histogram. But
with -twoway histogram- you may add a line, e.g. using the -scatteri-
   sysuse auto
   twoway (histogram mpg)(scatteri 0 20 0.1 20 , connect(l) msymbol(i))

Hope this helps

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796

*   For searches and help try:

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