Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inserting Mean and Median Vertical Lines on Multiple KDensity Plots

    Hi, I am using the multidensity package. Here's what I've tried:

    Code:
    sysuse auto, clear
    multidensity gen price, by(foreign)
    su _density1, meanonly
    multidensity super, recast(area) opt1(lcolor(orange) color(orange%40) xline(`r(mean)') opt2(lcolor(blue) color(blue%40)) title("Price (USD)")
    But the line does not appear. I'm really lost as to why this occurs. I'd like to add mean and median lines to my kdensity plots for each density.

  • #2
    it works for me, make sure to run all of the code in one go,



    did you mean -yline-,

    Comment

    Working...
    X