Search code examples
graphstata

Removing shaded area title from the graph in Stata


I built this graph but unable to remove/rename the label of the shaded area. How to do both?

enter image description here

line smunits timenew if maxcumul==158453||area smunits timenew if  timenew < 16.3&maxcumul==158453, legend(label(1 "Actual unit sales")) area("Weekly Sales") ytitle("Weekly Sales") xtitle("Week") title("All Oxi-Active, unit sales") 

Solution

  • For renaming the shaded area, have you tried this?

    line smunits timenew if maxcumul==158453||area smunits timenew if  timenew < 16.3&maxcumul==158453, legend(label(1 "Actual unit sales")  label(2 “Name Here”)) area("Weekly Sales") ytitle("Weekly Sales") xtitle("Week") title("All Oxi-Active, unit sales")
    

    i.e. add label(2 “Name Here”)