Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Making Kernel Density Graphs

From   Nick Cox <>
To   "''" <>
Subject   st: RE: Making Kernel Density Graphs
Date   Fri, 4 Feb 2011 15:40:50 +0000

Switch to -twoway kdensity-. 

. sysuse auto
(1978 Automobile Data)

. twoway kdensity mpg if foreign || kdensity mpg if !foreign, legend(order(1 "foreign" 2 "domestic")) xtitle("`: var label mpg'")

Or use the -generate()- option of -kdensity- to save results and then plot them with a -line-. 



I am making two graphs of two series gdf==52 and gdf==53 as follows:

kdensity opinion if gdf==52 
kdensity opinion if gdf==53

But I want to make one single graph of both series for comparison. Please
help me.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index