briatte / srqm

An introductory statistics course for social scientists, using Stata
https://f.briatte.org/teaching/quanti/
49 stars 17 forks source link

Graph scheme #25

Open briatte opened 4 years ago

briatte commented 4 years ago

Digging in tweets and bookmarks… My own scheme-burd seems to have a few issues in recent versions of Stata, so at least update it, or switch to one of those below.

stata-scheme-modern

https://github.com/mdroste/stata-scheme-modern#screenshots

Seems most promising. Would ideally like to support BuRd diverging colours.

538

ssc install g538schemes, replace all

https://danbischof.com/2017/09/05/a-final-stata-gift-538-schemes/

Via @rivelino22.

briatte commented 3 years ago

Test code:

sysuse auto, clear
gen group = _n in 1/16

gr bar price, over(group) asyvars scheme(s2color) ///
    name(s2color, replace)

gr bar price, over(group) asyvars scheme(burd) ///
    name(burd, replace)

gr bar price, over(group) asyvars scheme(modern) ///
    name(modern, replace)

gr mat trunk turn headroom, scheme(s2color) ///
    name(mat_s2color, replace)
gr mat trunk turn headroom, scheme(burd) ///
    name(mat_burd, replace)
gr mat trunk turn headroom, scheme(modern) ///
    name(mat_modern, replace)