Bookmark and Share

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


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

st: line options for overlayed twoway kdensity plots


From   Chris Hajzler <[email protected]>
To   [email protected]
Subject   st: line options for overlayed twoway kdensity plots
Date   Mon, 29 Nov 2010 13:02:08 +1300

Dear Statalist,

I am trying to change the line options (color, pattern) in an
overlayed kernel density plot using Stata version 8.

I have generated these plots using a command along the following lines:

twoway (kdensity x1 if (z==1), xscale(r(-1.7(0.5)1.7))) (kdensity x1
if (z==2), xscale(r(-1.7(0.5)1.7))), ytitle("stuff")

According to online Stata help files, " cline_options" are available
options using kdensity, such as lcolor and lpattern, but I am having
trouble figuring out how to include these options (or if, perhaps,
these options can only be used on more recent versions of Stata).  For
instance, if I try including "color(black)" or "lcolor(black)" as
either right before or right after the xscale option, I receive the
error message  "option lcolor() not allowed". (I know the density
function may not qualify as a line graph, so I have tried with and
without the "l" prefix, but this has not worked either.)

Does anyone know how I might change the density line colors/patterns?

Thanks in advance,
Chris
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index