View on GitHub

Stata-schemes

Here you will find various ready-to-use Stata schemes.

StataMin issues license Stars version release

SCHEMEPACK v1.3

In this repository are various ready-to-use Stata schemes. The earlier schemes come in three flavors: white, black, and gg (grey). As the names suggest, these are the background colors, where the last one is inspired by the ggplot2 scheme in R. The newer schemes are standalone versions with unique colors that allows the graphs to stand out.

Addition info:

Link to the Medium article that describes these schemes: Stata graph schemes by The Stata Guide. Here you can learn how to program your own schemes.

Note that scheme file options, e.g. colors, lines, sizes, etc. might be subject to minor adjustments to improve their overall visual quality.

How to install and use SCHEMEPACK

To install SCHEMEPACK, you can either get them directly from SSC (v1.3):

ssc install schemepack, replace

or install them from GitHub (v1.3):

(GitHub files might contain latest updates that have not been currently pushed to SSC).

net install schemepack, from("https://raw.githubusercontent.com/asjadnaqvi/Stata-schemes/main/schemes/") replace

Once installed, please see help schemepack for the scheme descriptions and test them out.

You can also download and run the scheme_test.do dofile to test various graph schemes that uses this test data:

use "https://github.com/asjadnaqvi/Stata-schemes/blob/main/scheme_test.dta?raw=true", clear

or try them out on your own datasets! If you want to revert back to the default Stata s2 scheme, then type set scheme s2color. Note that you can permanently set a scheme by typing set scheme <name>, perm.

Please report errors or bugs or suggestions in the Issues section.

Change log

How can you support the schemes?

You can support the schemes by using them :smirk:

You can also:

"Buy Me A Coffee!!!"

Preview

A preview of the schemes is given below. The latest ones are put on top. Not every scheme has been fine tuned for each and every aspect. Regardless, all elements can be modified from the graph interface window, which overwrite the scheme defaults. Some schemes are fairly robust. For example, white_tableau and white_w3d work really well and I use them most of the time. Some themes are great for presentations. For example, the dark themes on dark backgrounds, or gg schemes which keep the focus on the graph.

Each scheme has a standard number of built-in colors. Some schemes have been designed with few colors. These are highlighted in brackets in front of the scheme name. If no number is specified, the standard 12 color range is used. Colors are repeated if you have more graph elements than the defined number of colors. In this case, you can either: (a) think again about how much information you want to display, (b) cutomize elements like adding dotted or dashed lines etc., or (c) automate colors following the Cutomizing color schemes guide.

Standalone schemes

tab1 (12 colors)

tab2 (12 colors)

tab3 (12 colors)

cblind1 (10 colors) (color-blind friendly scheme)

ukraine (9 colors)

swift_red (8 colors)

Taylor Swift dropped a new album, Red, and we dropped a new Stata scheme celebrating it:

neon (12 colors) (pure black background)

Glowing neons on a black background. Perfect for a dark beamer presentation:

rainbow (6 colors)

Celebrating pride (2021 edition):

Tableau color scheme

white_tableau (my default scheme)

black_tableau

gg_tableau

Cividis color scheme

white_cividis

black_cividis

gg_cividis

Viridis color scheme

white_viridis

black_viridis

gg_viridis

Hue color scheme (default ggplot2 colors)

white_hue

black_hue

gg_hue

brbg color scheme

white_brbg

black_brbg

gg_brbg

piyg color scheme

white_piyg

black_piyg

gg_piyg

ptol color scheme

white_ptol

black_ptol

gg_ptol

jet color scheme

white_jet

black_jet

gg_jet

w3d color scheme

white_w3d

black_w3d

gg_w3d