In this repository are various new Stata schemes. Most of the schemes have been programmed 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.
These schemes are procedurally generated where the colors and other information is introduced in the schemes using scripts. The core white scheme is based on the Cleanplots theme (Mize 2018) that itself is derived from the plainplots theme (Bischof 2017). The colors have been passed on to the scheme using Ben Jann's colorpalette package (Jann 2018).
- The dofile contains the script to test the code.
- The graph folder contains the high resolution sample figures.
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.
The dofile in the folder can be copied and executed in Stata. Otherwise:
Check the installation:
net d schemepack, from("https://raw.githubusercontent.com/asjadnaqvi/Stata-schemes/main/schemes/")
and then type:
net install schemepack
Or install the schemes:
net install schemepack, from("https://raw.githubusercontent.com/asjadnaqvi/Stata-schemes/main/schemes/") replace
Once installed please see help schemepack
for the schemes and test them out.
You can also download and run the scheme_test.do dofile to test various graph schemes that use this test data:
use "https://github.com/asjadnaqvi/Stata-schemes/blob/main/scheme_test.dta?raw=true", clear
or your own datasets!
Please report errors or bugs or suggestions to improve the schemes. Not all graphs types have been tested and fine tuned. Several new schemes coming soon!
which scheme-s2color.scheme
. If it shows 2017, then don't use gg schemes. The white and black schemes should be fine. If the version is 2019 or higher (Stata 16+), then all the schemes should run fine.
- 28 Jun 2021: Minor errors in templates have been fixed. For example bar labels were showing in the wrong color in the black themes. The test file has been reduced in size. The preview graphs have been regenerated. The number of graphs show in the preview below have been reduced except for the tableau schemes. All files exist in the figure folder though.
- 26 Jun 2021: Two new schemes added: neon and rainbow. Neon tests a new and more generic scheme generator script. Rainbow celebrates the 2021 Pride month and introduces the 6 pride flag colors in the schemes. This scheme is fairly limited in the sense that it only has six colors. But these are more than enough for presentations etc. This is also derived from the generic scheme template used for the Neon scheme.
- 15 Jun 2021: Schemes updated to make them compatible with Stata 15 and earlier. The s2-scheme.scheme was updated to a new version in 2019 and the older scheme version was giving errors.
- 16 Apr 2021: Very minor fixes to some colors. Histograms fixed and added to the graphs. Following schemes added: brbg, piyg, ptol, jet, w3d
- 08 Apr 2021: Repository created with pkg file and the following schemes added: tableau, cividis, viridis, hue
You can support the schemes by using them 😏
You can also:
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.