Here you will find various ready-to-use Stata schemes.
(09 Nov 2022)
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.
The package can be installed via SSC or GitHub. The GitHub version, might be more recent due to bug fixes, feature updates etc, and may contain syntax improvements and changes in default values. See version numbers below. Eventually the GitHub version is published on SSC.
The package can be installed from SSC (v1.4):
ssc install schemepack, replace
or install them from GitHub (v1.4):
(GitHub files might contain latest updates that have not been currently pushed to SSC).
net install schemepack, from("https://raw.githubusercontent.com/asjadnaqvi/stata-schemepack/main/installation/") replace
Once installed, please see help schemepack
for the scheme descriptions and test them out.
You can also download and run the ./data/scheme_test.do dofile to test various graph schemes that uses this test data:
use "https://github.com/asjadnaqvi/stata-schemepack/blob/main/data/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.
A preview of the schemes is given below. Not every scheme has been fine tuned for each and every aspect. Regardless, all elements can be modified, either by using the GUI or syntax. Some general purpose schemes are white_tableau and cblind1. Some themes like neon or black_w3d are great for presentations on dark backgrounds.
Each scheme has a pre-defined number of colors which are marked next to the scheme names. If no number is specified, then the standard 12 color range is used. Colors repeat if there are more graph elements than the scheme colors. In this case, you can either: (a) think again about how much information you want to display since 12 colors is already a lot!, (b) cutomize elements like adding dotted or dashed lines etc., or (c) automate colors following the Cutomizing color schemes guide.
Taylor Swift dropped a new album, Red, and we dropped a new Stata scheme celebrating it:
Glowing neons on a black background. Perfect for a dark beamer presentation:
Celebrating pride (2021 edition):
ssc install schemepack, replace
). They collection has been renamed from tsg_schemes
to schemepack
to make it more generic and easier to remember. Black schemes have a notch darker background (its not pure black). Bar graph outlines adjusted to make them more visible. Otherwise some schemes were blending into the background.You can support the schemes by using them :smirk:
You can also: