Skip to main content

icplot

icplot makes plots, diagrams and images for technical documents at ICHEC. It converts between image formats, renders text-based diagrams to images and applies a shared theme.

It also draws the branded diagrams in our READMEs and handbooks. The 3D mesh and OpenFOAM code is now in icmesh.

Install

pip install icplot

The core install is small. Add the extras for the backends you need:

Extra Installs For
cairo CairoSVG SVG to PNG or PDF, and drawing scenes
imagemagick wand PDF to PNG
plot matplotlib plots and charts
video moviepy videos
all all of these everything

For example, pip install "icplot[cairo]". The cairo and imagemagick extras also need the system libraries. On a Mac:

brew install imagemagick cairo

Convert an image

icplot convert --source my_image.svg --target my_image.png

icplot converts SVG to PNG or PDF, and PDF to PNG.

Render a diagram

icplot render uml_diagram.puml

This renders the PlantUML file to PNG and SVG. icplot also renders LaTeX and TikZ, and Mermaid. It renders its own JSON formats for plots, trees, Gantt charts and scenes.

Render a folder of diagrams

Give icplot render a directory to render every diagram in it:

icplot render .

It reads render.yaml from the current directory, or the file you give with --config. For example:

tex:
  templates:
    - styles
    - templates
  build_engine: dvisvgm
plantuml:
  config_path: styles/puml-theme-platform.puml
excludes:
  - styles
  - templates

tex.templates adds directories to the TeX search path, so a diagram can load the TikZ libraries in them. build_engine: dvisvgm renders TikZ straight to SVG. plantuml.config_path applies a PlantUML theme to every diagram. excludes lists directories not to render.

For reusable TikZ libraries, see templates/tikz.

Draw a branded diagram

icplot.diagram draws SVG diagrams in the ICHEC brand, such as the feature maps and deployment flows in our READMEs and handbook. A diagram is a short Python script that builds a Diagram and saves it. The SVG embeds its font, so it looks the same in a browser, a GitLab README and a PDF.

from pathlib import Path

from icplot.diagram import BLUE, Diagram

d = Diagram(600, 300, "Example", "What the diagram shows, for screen readers")
d.card(24, 24, 220, 90)
d.icon("users", 40, 40)
d.text(72, 56, "Your users", 16, 700)
d.arrow([(244, 69), (340, 69)], BLUE)
d.logo(576, 240)
d.save(Path("example.svg"))

Keep a diagram's script beside its SVG, and commit both. Icons come from Lucide and Simple Icons. Add one with uv run scripts/vendor_icons.py lucide:<name> or simple-icons:<name>.

Theme a diagram

The theme follows Material 3. ref tokens hold the raw colours, sizes and fonts. sys tokens name what each is for, such as sys.color.outline, and point at ref tokens.

To make the theme files, run:

icplot theme generate --output_dir styles/

This writes a TikZ library, tikzlibraryplatform.code.tex, and a PlantUML theme, puml-theme-platform.puml. Don't edit them by hand. To change the theme, copy theme.json from the package source, change it and pass it with --theme.

To change one colour in one diagram, set it in that diagram. In TikZ, use \platformthemeset{accent=FF5500}. In PlantUML, add a skinparam after @startuml.

Don't theme colours that carry meaning in a notation, such as ArchiMate's layer colours.

Licence

Copyright 2026 Irish Centre for High End Computing. MIT licence, see LICENSE.

Metadata

Release files for icplot 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for icplot 0.7.1
File Size Uploaded
icplot-0.7.1.tar.gz 124.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for icplot 0.7.1
File Interpreter ABI Platform
icplot-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 293.4 kB

Release files / icplot-0.7.1.tar.gz

Download URL icplot-0.7.1.tar.gz
Size 124.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d045a164e6b28ef6f80837b81bd60fa2de8bdaf91ae4afb3b6f892e1e959594d
BLAKE2b-256 checksum
How to use checksums
ca434e2fa345af56662e05d098fdc62a95895f17a1ad4d0cd46781067ed4fdd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / icplot-0.7.1-py3-none-any.whl

Download URL icplot-0.7.1-py3-none-any.whl
Size 168.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e55b22f10584c9f7608452b6fe67724fae6db3a18a6b8f3565fcb356be9a18c3
BLAKE2b-256 checksum
How to use checksums
dc0f063b014eae7a0d411ebd2cd6faf3d2eed0e1442e9fd6dd7ea1167a528d52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page