Giter Club home page Giter Club logo

stata-schemes's Introduction

Stata schemes

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).

Since the schemes are scripted, this folder will be filled up with various schemes over time. It is also likely some schemes go through minor adjustments since not all possible graph combinations have been tested. Names and installation paths might change. Please check here for the updates.

  • 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 as well!

How to use the schemes:

The dofile in the folder can be copied and executed in Stata. Otherwise:

Check the installation:

net d tsg_schemes, from("https://raw.githubusercontent.com/asjadnaqvi/Stata-schemes/main/schemes/")

Install the schemes:

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

You can simply download and run the scheme_test.do dofile to test various graph schemes.

You can also 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!

โš ๏ธ A bug for Stata 15 was reported (June 2021). If you are using Stata 15, then the gg schemes won't work due to comptability issues. Type 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.

Change log

  • 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

How can you support the schemes?

You can support the schemes by using them :) Since several people asked, you can also make some small donation via PayPal:

paypal

This is of course completely optional!

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.

Neon

Rainbow

Tableau color scheme

white_tableau

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

stata-schemes's People

Contributors

asjadnaqvi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.