Announcement

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

  • How to adjust the colour of event plot ?

    When using the event_plot command, my code is

    Code:
    event_plot, alpha(0.01) default_look graph_opt(xtitle("Periods since the event") ytitle("Average causal effect") ///
        title("Random title") xlabel(-12(4)24))
    Where
    Code:
    default_look
    is equivalent to:

    Code:
     graph_opt(xline(0, lcolor(gs8) lpattern(dash)) yline(0, lcolor(gs8)) graphregion(color(white)) bgcolor(white) ylabel(, angle(horizontal))) lag_opt(color(navy))
                lead_opt(color(maroon) msymbol(S)) lag_ci_opt(color(navy%45 navy%45)) lead_ci_opt(color(maroon%45 maroon%45)) legend_opt(region(lstyle(none)))
    I got the graph as below
    Click image for larger version

Name:	1.PNG
Views:	1
Size:	143.0 KB
ID:	1629348


    What I want is to change the graph to black and white colours only, with the confident interval before zero and after zero are in different types to distinguish them.
    Thank you in advance.

    I have tried to merge the code together but it has failed so far

    Code:
    event_plot, alpha(0.01)   graph_opt(xline(0, lcolor(gs8) lpattern(dash)) yline(0, lcolor(gs8)) graphregion(color(white)) bgcolor(white) ylabel(, angle(horizontal))) lag_opt(color(navy))
                lead_opt(color(maroon) msymbol(S)) lag_ci_opt(color(navy%45 navy%45)) lead_ci_opt(color(maroon%45 maroon%45)) legend_opt(region(lstyle(none))) graph_opt(xtitle("Periods since the event") ytitle("Average causal effect") ///
        title("Random title") xlabel(-12(4)24))
    Click image for larger version

Name:	2.PNG
Views:	1
Size:	83.1 KB
ID:	1629349
Working...
X