Modern, customizable beamer and Stata/Python/R themes
Repository context: The upstream repository is
https://github.com/aarondwolf/wildcat. The scheme and plotting assets live inside thescheme/subdirectory of that repo:https://github.com/aarondwolf/wildcat/tree/main/schemeAll paths in this document are described relative to that
scheme/directory.
This guide provides instructions for AI coding agents to:
| Language | Core Assets | Example Suite | Styling Model | Source of Truth / Reference |
|---|---|---|---|---|
| Stata | scheme-wildcat.scheme, color-*.style, wildcat.pkg, stata/make_scheme.do |
stata/examples.do |
Stata Graph Scheme & Style definitions | Anchored to R ggplot2 |
| R | r/theme_wildcat.R, r/theme_nu.R |
r/examples.r |
ggplot2 theme functions & discrete scales |
Primary visual source of truth |
| Python | py/theme_wildcat.py, py/wildcat.mplstyle, py/__init__.py |
py/examples.py |
Matplotlib rcParams, cycler, helper functions |
Anchored to R ggplot2 |
When working in an agent environment with Stata available:
ssc install wildcat, replace
set scheme wildcat, permanently
net install for Latest Updates):
net from "https://raw.githubusercontent.com/aarondwolf/wildcat/main/scheme"
net describe wildcat
net install wildcat, replace
set scheme wildcat, permanently
path/to/scheme:
net from "path/to/scheme"
net describe wildcat
net install wildcat, replace
set scheme wildcat, permanently
net cannot write):
Copy scheme-wildcat.scheme into PERSONAL/s/ and all color-*.style files into PERSONAL/c/ (use sysdir in Stata to resolve PERSONAL).Once installed:
* Apply scheme globally or per graph:
set scheme wildcat
* Use native Northwestern brand colors directly in graph commands:
twoway (scatter mpg weight, mcolor(nupurple) mlcolor(nudarkorange)) ///
(lfit mpg weight, lcolor(nupurple%80) lwidth(medthick)), ///
title("{bf:Mileage vs. Weight}", size(medium) color(wc_title)) ///
subtitle("Northwestern branding", size(small) color(wc_body)) ///
note("Source: 1978 Automobile Data", size(vsmall) color(wc_body))
examples.do)For a complete demonstration of all 16 publication-grade chart types implemented in Stata, see stata/examples.do. It demonstrates:
Do not manually edit scheme-wildcat.scheme directly; edit and execute stata/make_scheme.do:
stata/make_scheme.do, change:
local scheme_name "custom_name" // Will generate scheme-custom_name.scheme
local scheme_title "Custom Theme"
local myblue "0 51 102"
local mygold "255 199 44"
local custom_colors myblue mygold
local color1 "myblue’”, local color2 “mygold'", etc.do stata/make_scheme.do. It regenerates scheme-<name>.scheme and all corresponding color-<name>.style files.ggplot2)R packages are often invoked on systems without Git cloning. Agents can load theme_wildcat.R directly via URL or local path:
source("r/theme_wildcat.R")
# Raw URL to GitHub scheme folder
source("https://raw.githubusercontent.com/aarondwolf/wildcat/main/scheme/r/theme_wildcat.R")
library(ggplot2)
source("r/theme_wildcat.R")
ggplot(df, aes(x = weight, y = mpg, color = foreign)) +
geom_point(size = 2.2) +
scale_color_wildcat() + # Or scale_color_nu()
theme_wildcat() + # Or theme_nu()
labs(
title = "Automobile Weight vs. Fuel Efficiency",
subtitle = "Northwestern branding",
x = "Vehicle Weight (lbs.)",
y = "Mileage (mpg)",
caption = "Source: 1978 Automobile Data"
)
For continuous fills/colors:
scale_fill_wildcat_c(palette = "purple")scale_fill_wildcat_c(palette = "diverging")examples.r)For matching ggplot2 implementations of all 16 standardized chart types, see r/examples.r. It shows how to apply theme_wildcat(), scale_color_nu(), and scale_fill_nu() across the full benchmark suite.
wildcat_colors:
wildcat_colors <- c(
...,
myblue = "#003366",
mygold = "#FFC72C"
)
wildcat_palettes$default with your custom color keys.theme_mycustom <- theme_wildcat
scale_color_mycustom <- scale_color_wildcat
matplotlib)Agents can download or import theme_wildcat.py and wildcat.mplstyle:
py is on PYTHONPATH or import directly:
import sys
from pathlib import Path
# Add scheme folder to path if needed:
sys.path.append(str(Path("path/to/scheme")))
from py.theme_wildcat import set_theme, wildcat_colors, wildcat_palettes, labs, legend_top
urllib or requests):
If working in a headless container or scratch folder:
import urllib.request
base_url = "https://raw.githubusercontent.com/aarondwolf/wildcat/main/scheme/py/"
urllib.request.urlretrieve(base_url + "theme_wildcat.py", "theme_wildcat.py")
urllib.request.urlretrieve(base_url + "wildcat.mplstyle", "wildcat.mplstyle")
import matplotlib.pyplot as plt
from py.theme_wildcat import set_theme, wildcat_colors, labs, legend_top
# 1. Apply theme globally
set_theme()
# 2. Build plot
fig, ax = plt.subplots(figsize=(8.0, 5.0))
for group_name, grp in df.groupby("foreign"):
ax.scatter(grp["weight"], grp["mpg"], label=group_name, s=28)
# 3. Add ggplot2-style titles & subtitle
labs(
ax,
title="Automobile Weight vs. Fuel Efficiency",
subtitle="Northwestern branding",
x="Vehicle Weight (lbs.)",
y="Mileage (mpg)",
caption="Source: 1978 Automobile Data"
)
# 4. Add top legend aligned to ggplot2 position
legend_top(ax, ncol=2)
plt.savefig("figure.png", dpi=300)
examples.py)For matching Matplotlib implementations of all 16 standardized chart types, see py/examples.py. It shows how to use set_theme(), labs(), and legend_top() across the full benchmark suite.
wildcat_colors:
wildcat_colors["myblue"] = "#003366"
wildcat_colors["mygold"] = "#FFC72C"
wildcat_palettes["default"] list.theme_mycustom = set_theme
The three example files (stata/examples.do, r/examples.r, and py/examples.py) implement the identical 16 publication-grade chart types using the shared benchmark datasets in data/:
auto.dta)auto.dta)auto.dta)auto.dta)trends.dta)auto.dta)auto.dta)lollipop.dta)forest.dta)dumbbell.dta)auto.dta)auto.dta)auto.dta)area.dta)ribbon.dta)pyramid.dta)Use these example scripts as templates whenever generating charts in any of the three languages to guarantee exact visual parity.
When generating plots or modifying themes, maintain these parity rules unless users request to change them specifically:
get_wildcat_rcparams():
left=0.075, right=0.972, bottom=0.177, top=0.810.legend_top(ax) or bbox_to_anchor=(x0, 0.840), bbox_transform=fig.transFigure, loc="center left" to avoid shifting plot axes downward.#222222, 14.3 pt, flush left.#666666, ~10.8 pt, placed below title.#EAEAEA. Y-axis line and ticks are hidden; X-axis has subtle #CCCCCC baseline.