Skip to content
Skills Library
Data & analytics · Building & coding

sciris-plotting

/sciris-plotting

Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.

Repository
sciris ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.

Original author description

Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.

How it works

  1. Setup and Options
  2. Plot Styles
  3. Axis Formatting
  4. Layout Helpers
  5. Colors
  6. 3D Plotting
  7. Saving Figures
Original SKILL.md headings · 73 lines, 240 words
SKILL.md preview
---
name: sciris-plotting
description: Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.
---

# Sciris Plotting and Colors

Reference for Matplotlib extensions and color utilities. See full tutorial: `docs/tutorials/tut_plotting.ipynb`.

If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.

## Setup and Options

```python
sc.options(jupyter=True)              # High-res retina backend for Jupyter
sc.options(dpi=120)                   # Set figure DPI
sc.options(font='serif')              # Change font globally
sc.options(font='default')            # Reset font
```

## Plot Styles

```python
with plt.style.context('sciris.simple'):   # Clean, minimal style
    make_plot()
with plt.style.context('sciris.fancy'):    # Seaborn-like style
    make_plot()
```

## Axis Formatting

```python
sc.dateformatter()                    # Auto date formatting on x-axis
sc.commaticks()                       # Comma-separated tick labels (1,000,000)
sc.SIticks()                          # SI notation (1M, 2.5k)
sc.setylim()                          # Auto y-limits (starts at 0)
sc.boxoff()                           # Remove top/right spines
sc.figlayout()                        # Tight layout (remove whitespace)
```

## Layout Helpers

```python
rows, cols = sc.getrowscols(14)       # Auto grid for N subplots
```

## Colors

### Continuous (for ordered data)
```python
colors = sc.vectocolor(n, cmap='turbo')       # Map values to colormap
colors = sc.vectocolor(values, cmap='parula')  # Custom Sciris colormaps: parula, orangeblue
c = sc.arraytocolor(data_2d)                   # 2D version
```

### Categorical (for distinct groups)
```python
colors = sc.gridcolors(n)             # n<=9: ColorBrewer, 10-19: Kelly's, 20+: uniform RGB
colors = sc.gridcolors(n, asarray=True)  # As numpy array
```

## 3D Plotting

```python
ax = sc.ax3d(121)                     # Create 3D subplot
sc.scatter3d(x, y, z, c=colors, ax=ax)
sc.bar3d(data, ax=ax)
sc.surf3d(data, cmap='orangeblue')
```

## Saving Figures

```python
sc.savefig('fig.png')                 # Publication quality + metadata
sc.savefig('fig.png', comments='v2')  # With custom comments
```

Versions

The database has no other skills named sciris-plotting.

Database snapshot: 13.11.2026 · package version c98f63430f0b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95sciris-intro
    Use when the user needs to implement a basic Sciris features — finding array values, plotting with date formatting, objdict containers, saving/loading objects, or parallelization.
  • 95sciris-files
    Use when saving or loading files with Sciris — sc.save, sc.load, sc.savejson, sc.loadjson, sc.saveyaml, sc.readyaml, sc.savearchive, sc.loadarchive, sc.savefig, sc.loadmetadata, sc.getfilelist, sc.thispath, sc.makefilepath, sc.rmpath, sc.metadata, sc.compareversions, sc.require,…
  • 100matplotlib
    Low-level plotting library for full customization. Use when you need fine-grained control over every plot element, axes, and layout.
  • 100journal-matplotlib
    Apply a three-mode Matplotlib workflow for exploratory, report, or publication-quality scientific figures. Use only when the user explicitly invokes or names journal-matplotlib; never trigger it automatically for ordinary plotting.
  • 100plot-styling
    This skill should be used when the user asks to "plot data", "make a plot for a paper", "make a publication plot", "create a journal-quality plot", "matplotlib for a figure", "use seaborn", "use plotnine", "use ggplot in Python", "improve plot quality", "style my plot", "clean…
  • 90matplotlib-scientific
    Build publication-quality Matplotlib figures for scientific Python. Use when plotting experiment or analysis results, multi-panel figures, journal-sized layouts, tick formatting, legends (fancy/plain, placement, compact handles), point annotations, inset zooms, twin axes,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.