Metadata-Version: 2.4
Name: icplot
Version: 0.6.0
Summary: Utilities for generating plots and graphics for technical reports.
Author: Irish Centre for High End Computing
License: MIT
Project-URL: Repository, https://git.ichec.ie/platform-engineering/modules/documentation/ichec-plot
Project-URL: Homepage, https://git.ichec.ie/platform-engineering/modules/documentation/ichec-plot
Keywords: Publishing,Technical Reports,Graphics
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: iccore==0.2.3
Requires-Dist: graphviz
Requires-Dist: Jinja2
Provides-Extra: cairo
Requires-Dist: CairoSVG; extra == "cairo"
Provides-Extra: imagemagick
Requires-Dist: wand; extra == "imagemagick"
Provides-Extra: plot
Requires-Dist: matplotlib; extra == "plot"
Provides-Extra: video
Requires-Dist: moviepy; extra == "video"
Provides-Extra: all
Requires-Dist: CairoSVG; extra == "all"
Requires-Dist: wand; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: moviepy; extra == "all"
Dynamic: license-file

# icplot

This is a library used at [The Irish Centre for High End Computing (ICHEC)](https://www.ichec.ie) for generating plots, diagrams and other graphics for technical documents.

# Scope #

The library is **frozen to what its consumers use** — the `ichec-handbook`
build tool and `ichec-flow`. That means `converter`, `renderer`, `theme` and
`graph`: fixes and maintenance yes, new capability no.

The `geometry`/`mesh` 3D and OpenFOAM code has moved to
[icmesh](https://git.ichec.ie/platform-engineering/modules/ichec-mesh), taking
VTK and scipy with it — including VTK plot output, which is now
`icmesh.plot`. Install `icmesh` if you want it.

# Features #

The project has three primary modules:

`converter`: Converts between image formats, such as pdf, svg and png
`renderer`: Render text based inputs as svg, pdf or png images or videos
`theme`: Generate and apply themes from a design system


## Converter ##

To covert between image formats you can do:

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

Supported conversions are:

* svg -> png
* svg -> pdf
* pdf -> png

## Renderer ##

Render a range of text based formats to images or videos. For example,

``` shell
icplot render --file uml_diagram.puml
```

renders the PlantUML file to png and svg. 

Supported render inputs and targets are:

* PlantUml
  * SVG
  * PNG
* Latex/Tikz
  * PDF
  * SVG
  * PNG
* Mermaid
  * SVG
  * PNG
* Custom JSON 
  * Graph
    * Backends:
      * Matplotlib
    * Output formats:
      * SVG
      * PNG
      * MP4
  * Tree
    * Backends:
      * Graphviz
    * Output formats:
      * SVG
      * PNG
  * Gantt
    * Backends:
      * Cairo
      * PgfGantt
    * Output formats:
      * SVG
      * PNG
  * Scene
    * Backends:
      * Cairo
    * Output formats:
      * SVG
      
## Themes ##

The library supports themeing with an Angular Material 3 motivated design system. Plots can be themed by adapting a version of `theme.json` included in this module's source.  Currently Tikz and PlantUML support themeing.
  
# Installation #

The package is available on PyPI. The core install is deliberately light — it
does not pull the heavy rendering backends, so consumers that only need part of
the library (e.g. a docs build that just converts svg to png) stay small:

``` shell
pip install icplot
```

Backends are opt-in via extras:

| Extra | Pulls | Enables |
|---|---|---|
| `cairo` | CairoSVG | svg → png / pdf conversion, and vector scene drawing |
| `imagemagick` | wand | pdf → png conversion (falls back to the `magick` CLI) |
| `plot` | matplotlib | 2D plotting (`renderer.graph`, `charts`) |
| `video` | moviepy | video assembly (`renderer.video`) |
| `all` | all of the above | everything |

For example, `pip install icplot[cairo]` for svg conversion, or
`pip install icplot[all]` for the full toolkit. The native `cairo` and
`imagemagick` system libraries are also required for those backends; on Mac:

``` shell
brew install imagemagick cairo
```

# Copyright #

Copyright 2026 Irish Centre for High End Computing

The software in this repository can be used under the conditions of the MIT license, which is available for reading in the accompanying LICENSE file.

