{smcl}
{com}{sf}{ul off}{txt}
{com}. 
. **** REPLICATION OF FIGURE 2 ****
. 
. clear all
{res}{txt}
{com}. set mem 2g
{txt}{bf:set memory} ignored.
{p 4 4 2}
Memory no longer
needs to be set in modern Statas;
memory adjustments are performed on the fly
automatically.
{p_end}

{com}. set more off
{txt}
{com}. 
. /*      
>         OUTLINE
>         1. DRAW GRAPH
> */
. 
. *************************
. ***** 1. DRAW GRAPH *****
. *************************
. 
. // Import candidate data
. 
. use $data\EEREV-D-21-00004_Data_Candidates.dta, clear
{txt}
{com}. 
. // All candidates
. 
. twoway  (scatter tru_C neg_C if radright==0 & annee<=1974, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy*.5) mlabcolor(navy*.5)) ///
>                 (scatter tru_C neg_C if radright==1 & annee<=1974, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy*.5) mlabcolor(navy*.5) msymbol(D)) ///
>                 (scatter tru_C neg_C if radright==0 & annee>=1995, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy) mlabcolor(navy)) ///
>                 (scatter tru_C neg_C if radright==1 & annee>=1995, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy) mlabcolor(navy) msymbol(D)) ///
>                 (lfit tru_C neg_C, range(-.04 .54) lcolor(maroon) lpattern(dash)) ///
>                 , title("All candidates", ring(0)) xtitle("Candidate radicalism (CMP)") ytitle("Voter distrust (FES, log scale)") ///
>                 xlabel(0 "0" .1(.1).5, format(%5.1f)) ylabel(0 "1" 1.6094379 "5" 3.2188758 "25" 4.8283137 "125", format(%5.0f) angle(0)) xscale(r(-.05 .55)) yscale(r(-.5 5.5)) ///
>                 legend(off) /// 
>                 graphregion(color(white)) name(all, replace)
{res}{txt}
{com}. 
. // Maor candidates              
. 
. twoway  (scatter tru_C neg_C if poll>.1 & radright==0 & annee<=1981, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy*.5) mlabcolor(navy*.5)) ///
>                 (scatter tru_C neg_C if poll>.1 & radright==1 & annee<=1981, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy*.5) mlabcolor(navy*.5) msymbol(D)) ///
>                 (scatter tru_C neg_C if poll>.1 & radright==0 & annee>1981, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy) mlabcolor(navy)) ///
>                 (scatter tru_C neg_C if poll>.1 & radright==1 & annee>1981, mlabel(cand_year) mlabsize(tiny) msize(small) mlabpos(12) mcolor(navy) mlabcolor(navy) msymbol(D)) ///
>                 (lfit tru_C neg_C if poll>.1, range(-.04 .54) lcolor(maroon) lpattern(dash)) ///
>                 , title("Major candidates (above 10% in polls)", ring(0)) xtitle("Candidate radicalism (CMP)") ytitle("Voter distrust (FES, log scale)") ///
>                 xlabel(0 "0" .1(.1).5, format(%5.1f)) ylabel(0 "1" 1.6094379 "5" 3.2188758 "25" 4.8283137 "125", format(%5.0f) angle(0)) xscale(r(-.05 .55)) yscale(r(-.5 5.5)) ///
>                 legend(lab(1 "Before 1974") lab(3 "After 1995") lab(4 "Radical right") order(1 3 4) pos(4) region(col(white)) ring(0) c(1) symx(*0.5) size(vsmall)) ///
>                 graphregion(color(white)) name(major, replace)
{res}{txt}
{com}.                 
. graph combine all major /// 
>         , c(2) graphregion(color(white)) imargin(vsmall) ///
>         b1title("") l1title("", size(vsmall)) 
{res}{txt}
{com}.         
. graph export "$results\\$program.png", replace width(7200) height(3000)
{txt}{p 0 4 2}
file {bf}
D:\Dropbox\SVLACHOS\Research\Malgre_nous\Replication_files\Results\EEREV-D-21-00004_Figure2.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. cap log close
{smcl}
{com}{sf}{ul off}