Announcement

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

  • Changing the color of kdensity line on top of histogram

    I ran the following code to draw kdensity line on top of histogram. But it gives me a green color and I want to change it to blue. There must be easy way to do it. Help please.

    HTML Code:
    hist mixlcorb_premium, kdensity bin(20) fraction fc(none) lc(black) lwidth(0.1) xtitle ("β of Premium", yoffset(-1)) legend(off) 
    forval i=1/17{
          gr_edit .plotregion1.plot1.EditCustomStyle , j(`i') style(area(shadestyle(color(grey%30))))
    }

  • #2
    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . hist mpg, kdensity
    (bin=8, start=12, width=3.625)
    
    . help hist
    
    . hist mpg, kdensity kdenopts(lc(blue))

    Comment

    Working...
    X