Docs · Integrations

scivue for R & Python

Apply the SciVue design system to figures generated in R (ggplot2) and Python (matplotlib / seaborn). One theme, one palette, journal-ready output — without leaving your IDE.

R · ggplot2 theme

install.packages('scivue') — replaces theme_minimal() with theme_scivue() and adds matching color/fill scales.

remotes::install_github('scivue/scivue-r')
# install once
install.packages("remotes")
remotes::install_github("scivue/scivue-r")

library(ggplot2)
library(scivue)

ggplot(mtcars, aes(wt, mpg, color = factor(cyl))) +
  geom_point(size = 2) +
  labs(title = "Engine weight vs fuel economy",
       x = "Weight (1000 lbs)", y = "MPG", color = "Cyl") +
  theme_scivue() +
  scale_color_scivue()

ggsave("figure.pdf", width = 5.5, height = 4, device = cairo_pdf)

Python · matplotlib + seaborn

pip install scivue — call scivue.use() once. Applies rcParams (fonts, axes, grid, color cycle).

pip install scivue
# install once
pip install scivue

import matplotlib.pyplot as plt
import seaborn as sns
import scivue

scivue.use()  # applies theme + fonts + color cycle

tips = sns.load_dataset("tips")
fig, ax = plt.subplots(figsize=(5.5, 4))
sns.boxplot(data=tips, x="day", y="total_bill", hue="sex",
            palette=scivue.palette("categorical"), ax=ax)
ax.set_title("Total bill by day")
fig.savefig("figure.pdf", dpi=300, bbox_inches="tight")

Tokens

Both packages read from the same canonical token file. Use it directly if you're rolling your own integration.

{
  "fonts": { "display": "Sora", "body": "Manrope", "mono": "JetBrains Mono" },
  "colors": {
    "primary": "#5663A6",
    "categorical": ["#5663A6","#7B9CC2","#5C8C73","#C29A4A","#B5564A","#7E6CB0","#3F8FA6","#A66A8E"]
  }
}

Download the full file: scivue-theme.json

R package source (sketch)
# theme_scivue() — minimal sketch of the package internals
theme_scivue <- function(base_size = 10) {
  theme_minimal(base_size = base_size, base_family = "Manrope") %+replace%
    theme(
      plot.title    = element_text(family = "Sora", face = "bold", size = base_size + 2,
                                   color = "#2A2D33", hjust = 0, margin = margin(b = 6)),
      plot.subtitle = element_text(color = "#5C6068", size = base_size - 1, hjust = 0),
      axis.title    = element_text(color = "#2A2D33", size = base_size),
      axis.text     = element_text(color = "#5C6068", size = base_size - 1),
      axis.line     = element_line(color = "#2A2D33", linewidth = 0.3),
      panel.grid.major = element_line(color = "#E3E5E8", linewidth = 0.25),
      panel.grid.minor = element_blank(),
      panel.background = element_rect(fill = "white", color = NA),
      plot.background  = element_rect(fill = "white", color = NA),
      strip.background = element_rect(fill = "#F1F2F5", color = NA),
      strip.text       = element_text(color = "#2A2D33", face = "bold"),
      legend.position  = "right",
      legend.title     = element_text(size = base_size - 1, color = "#2A2D33"),
      legend.text      = element_text(size = base_size - 2, color = "#5C6068"),
      legend.background = element_blank()
    )
}

scivue_palette <- c("#5663A6","#7B9CC2","#5C8C73","#C29A4A",
                    "#B5564A","#7E6CB0","#3F8FA6","#A66A8E")

scale_color_scivue <- function(...) scale_color_manual(values = scivue_palette, ...)
scale_fill_scivue  <- function(...) scale_fill_manual(values = scivue_palette, ...)
Python package source (sketch)
# scivue/__init__.py — minimal sketch
from cycler import cycler
import matplotlib as mpl

CATEGORICAL = ["#5663A6","#7B9CC2","#5C8C73","#C29A4A",
               "#B5564A","#7E6CB0","#3F8FA6","#A66A8E"]

def use():
    mpl.rcParams.update({
        "font.family": "Manrope",
        "axes.titlesize": 11,
        "axes.titleweight": "bold",
        "axes.titlepad": 8,
        "axes.labelsize": 10,
        "axes.labelcolor": "#2A2D33",
        "axes.edgecolor": "#2A2D33",
        "axes.linewidth": 0.6,
        "axes.spines.top": False,
        "axes.spines.right": False,
        "axes.prop_cycle": cycler(color=CATEGORICAL),
        "xtick.color": "#5C6068",
        "ytick.color": "#5C6068",
        "xtick.labelsize": 9,
        "ytick.labelsize": 9,
        "grid.color": "#E3E5E8",
        "grid.linewidth": 0.5,
        "axes.grid": True,
        "axes.grid.axis": "y",
        "legend.frameon": False,
        "legend.fontsize": 9,
        "figure.facecolor": "white",
        "axes.facecolor": "white",
        "savefig.dpi": 300,
        "savefig.bbox": "tight",
    })

def palette(name="categorical"):
    return CATEGORICAL
Need a Quarto / R Markdown template, or a Jupyter notebook starter? Ping the team — we maintain both.