Hi everyone.
I would love to know how to create different lines by pattern. Below is my dataset.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(admission_year Type_1 Type_2 Type_3 Type_4) 1 .2255541 .14637904 .1835391 .125 2 .04302477 .1494607 .1654321 .04166667 3 .2346806 .16640987 .2436214 .24621212 4 .1642764 .08474576 .15226337 .24810606 5 .19035202 .1725732 .1876543 .23958333 6 .14211212 .28043142 .06748971 .09943182 end
I used the following code to graph my data.
Code:
graph twoway line Type_1 Type_2 Type_3 Type_4 admission_year, clwidth(thick) clcolor(yellow red green blue) title("Admission by Year") subtitle("2012-2018 cohort") legend( order(1 "Type_1" 2 "Type_2" 3 "Type_3" 4 "Type_4")) ylabel(0(.1).5, angle(horizontal)) ytitle("Percentage") xtitle("Year")
Code:
graph twoway line Type_1 Type_2 Type_3 Type_4 admission_year, clwidth(thick) clcolor(yellow red green blue) title("Admission by Year") subtitle("2012-2018 cohort") legend( order(1 "Type_1" 2 "Type_2" 3 "Type_3" 4 "Type_4")) ylabel(0(.1).5, angle(horizontal)) ytitle("Percentage") xtitle("Year"), msymbol(D, T, X, S)
0 Response to Creating distinguishable lines for folks who are colorblind when using graph twoway line
Post a Comment