explaingit

garrettj403/scienceplots

8,832PythonAudience · researcherComplexity · 2/5Setup · moderate

TLDR

A Python package that applies publication-ready styles to Matplotlib charts with a single line of code, including presets for IEEE papers, Nature articles, and color-blind-safe palettes.

Mindmap

mindmap
  root((SciencePlots))
    What it does
      Publication-ready styles
      Single line to apply
      Temporary style blocks
    Journal presets
      IEEE format
      Nature format
      Science base style
    Color options
      Color-blind safe
      Paul Tol palettes
    Language support
      Chinese Japanese Korean
      Russian Turkish
    Audience
      Researchers
      Academics
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Style a Matplotlib figure to meet IEEE single-column, black-and-white formatting requirements for submission.

USE CASE 2

Apply a Nature-compatible chart style to a research figure with one added line of code.

USE CASE 3

Generate color-blind-safe plots using the built-in alternative color cycle options based on Paul Tol palettes.

Tech stack

PythonMatplotlibLaTeX

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a working LaTeX installation for default text rendering, a no-LaTeX style option is available for environments without LaTeX.

In plain English

SciencePlots is a Python package that provides pre-built visual styles for making charts and graphs look appropriate for scientific papers, presentations, and theses. It works with Matplotlib, a widely used Python charting library, by giving you style presets you can apply to your plots with a single line of code. The core style is called "science" and is designed to produce clean, publication-quality figures. You can layer additional styles on top of it to match the requirements of specific academic journals. There are styles tailored for IEEE papers, which require figures to remain readable in black and white and fit within a single column, and for Nature articles, which call for sans-serif fonts. Styles can be mixed and matched, and you can apply them temporarily to just one section of your code if you do not want them to affect the entire script. The package also includes a set of alternative color cycles, including options that are safe for people with color blindness. There is a collection based on Paul Tol's discrete rainbow color sets with configurations for different numbers of distinct colors. Language support is another feature: SciencePlots includes styles for labels and text in Traditional Chinese, Simplified Chinese, Japanese, Korean, Russian, and Turkish. These require separate font installations described in the project's documentation. Installation is available through pip or conda. One prerequisite is a working LaTeX installation, since the styles use LaTeX for text rendering by default. A no-LaTeX style option exists for environments where LaTeX is not available.

Copy-paste prompts

Prompt 1
Show me how to apply the SciencePlots IEEE style to an existing Matplotlib figure in Python with a minimal code change.
Prompt 2
How do I use SciencePlots to temporarily style just one chart in my script without affecting all other plots?
Prompt 3
Generate a Matplotlib bar chart using SciencePlots with a color-blind-safe palette suitable for a Nature journal submission.
Prompt 4
How do I install SciencePlots and its LaTeX dependency on Ubuntu so fonts render correctly in my figures?
Open on GitHub → Explain another repo

← garrettj403 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.