The Issue blindschemes NewFigureSchemesforStata: plotplain ... · The Issue Solutions blindschemes...
-
Upload
trankhuong -
Category
Documents
-
view
213 -
download
0
Transcript of The Issue blindschemes NewFigureSchemesforStata: plotplain ... · The Issue Solutions blindschemes...
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
1/17
New Figure Schemes for Stata:plotplain & plottig
Daniel Bischof1
1University of Zurich
November 17, 2016
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
2/17
The Default Stata Figure Schemes
12
34
56
4 5 6 7logged number of terrorist events
95% CI Fitted values
logged number of killed people
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
3/17
Limitations
colors are difficult to differentiate for colorblind peoplebackground tintingframessymbols, markers, lines often too thickgridlines only parallel to x-axislegends could be placed closer to content of figure
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
4/17
Solutions
1 the obvious solution is to produce code
; lots of code . . .
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
4/17
Solutions
1 the obvious solution is to produce code; lots of code . . .
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
5/17
Solutions
twoway ///
(line numcountries year, lcolor(gs12)) ///
, ylabel(, angle(horizontal)) xtitle("") ///
graphregion(fcolor(white) lcolor(white)
lwidth(vvvthick) ifcolor(white)
ilcolor(white) ilwidth(vvvthick)) ///
plotregion(lcolor(white) lwidth(vvvthick)
ifcolor(white) ilcolor(white)
ilwidth(vvvthick)) ///
legend(cols(1) region(lcolor(white)))
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
6/17
Solutions
1 the obvious solution is to produce code; lot’s of code . . .2 use Billy Buchanan’s brewscheme to define your own
designs
3 write a new package addressing some of the keylimitations
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
6/17
Solutions
1 the obvious solution is to produce code; lot’s of code . . .2 use Billy Buchanan’s brewscheme to define your own
designs3 write a new package addressing some of the key
limitations
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
7/17
Why write a new figure scheme?
! time! ensure quality (create uniform norm)! simplify the usage of more and new colors! many users lack knowledge how to adapt figures
⇒ there seems to be a high demand for new and alternativefigure schemes
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
8/17
Solution 3: Write a new figure scheme
I wrote 2 figure schemes:plotplain: very simple, “clean” figure schemeplottig: replicates ggplot2 (R) by Hadley Wickham in mostregards
→ both available with colors distinguishable for colorblindpeople
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
8/17
Solution 3: Write a new figure scheme
I wrote 2 figure schemes:plotplain: very simple, “clean” figure schemeplottig: replicates ggplot2 (R) by Hadley Wickham in mostregards
→ both available with colors distinguishable for colorblindpeople
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
9/17
Solution 3: blindschemes in the SSC Archive
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
10/17
Plotplain
1
2
3
4
5
6
4 5 6 7
logged number of terrorist events
Western Europe
North America
MENA
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
11/17
Plottig
1
2
3
4
5
6
4 5 6 7logged number of terrorist events
Western Europe
North America
MENA
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
12/17
The colorblind colors
0
2
4
6
8
10
plotplainblind
black
gs10
sky
turquoise
orangebrown
reddish
vermillion
sea
ananas
0
5
10
15
plottig
blackplr1ply1plg1plb1pll1plr2ply2plg2plb2pll2ply3plg3plb3pll3
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
13/17
Adaptation of Code: Gridlines
lpoly nkill iyear if region==12, ///
ci legend(off) title("Polynomial fit of terrorist
casualties in Western Europe") ///
note("")
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
14/17
Adaptation of Code: Gridlines
1
2
3
4
5
6
logged n
um
ber
of kill
ed p
eople
1970 1980 1990 2000 2010 2020incident year
Polynomial fit of terrorist casualties in Western Europe
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
15/17
Adaptation of Code: Gridlines
lpoly nkill iyear if region==12, ///
ci legend(off) title("Polynomial fit of terrorist
casualties in Western Europe") ///
note("") xlabel(, nogrid)
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
16/17
Adaptation of Code: Gridlines
1
2
3
4
5
6
logged n
um
ber
of kill
ed p
eople
1970 1980 1990 2000 2010 2020incident year
Polynomial fit of terrorist casualties in Western Europe
The Issue
Solutions
blindschemes
The Schemes
Adaptation
Conclusion
17/17
Conclusion
+ Improvement: Less code needed, users can focus on othertasks
+ Disagreement: Even if you disagree, less changes areneeded for further adaptation
- Concerns: Still issues remain, e.g. overlapping confidenceintervalsFor further information including the working paper on theschemes:
danbischof.com