Metadata-Version: 2.4
Name: compas_plotter
Version: 1.0.0
Summary: 2D visualisation of COMPAS geometry and data structures with matplotlib.
Author-email: tom van mele <tom.v.mele@gmail.com>
License: MIT License
        
        Copyright (c) 2026 COMPAS Association
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://compas.dev/compas_plotter
Project-URL: Documentation, https://compas.dev/compas_plotter
Project-URL: Repository, https://github.com/compas-dev/compas_plotter
Project-URL: Changelog, https://github.com/compas-dev/compas_plotter/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/compas-dev/compas_plotter/issues
Project-URL: Forum, https://forum.compas-framework.org/
Keywords: architecture,engineering,geometry,visualisation,matplotlib,plotting
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: compas<3,>=2.3
Requires-Dist: matplotlib>=3.5
Requires-Dist: pillow
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Requires-Dist: compas_invocations2[mkdocs]; extra == "dev"
Requires-Dist: invoke>=0.14; extra == "dev"
Requires-Dist: mkdocs-print-site-plugin; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: tomlkit; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# COMPAS Plotter

[![Made with COMPAS](https://compas.dev/badge.svg)](https://compas.dev)
![build](https://github.com/compas-dev/compas_plotter/workflows/build/badge.svg)
[![License](https://img.shields.io/github/license/compas-dev/compas_plotter.svg)](https://github.com/compas-dev/compas_plotter/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/compas_plotter.svg)](https://pypi.org/project/compas_plotter/)

**2D visualisation of COMPAS geometry and data structures, powered by matplotlib.**

`compas_plotter` provides a lightweight, dependency-free (other than matplotlib)
way to draw COMPAS objects in 2D. It is the COMPAS 2.x successor of the
`compas_plotters` package that shipped inside COMPAS up to version 1.17, rebuilt
on top of the modern [`compas.scene`](https://compas.dev/compas/latest/) system.
It registers a `"Plotter"` visualisation context, so any COMPAS object with a
registered plotter scene object can be drawn with a single `plotter.add(...)`.

## Installation

```bash
pip install compas_plotter
```

## Quick start

```python
from compas.geometry import Point, Line, Polygon
from compas.datastructures import Mesh
from compas_plotter import Plotter

plotter = Plotter(figsize=(8, 5))

mesh = Mesh.from_polyhedron(8)
plotter.add(mesh, show_vertices=True, show_edges=True)
plotter.add(Polygon([[0, 0, 0], [3, 0, 0], [3, 3, 0]]), facecolor=(0.9, 0.9, 1.0))
plotter.add(Line(Point(0, 0, 0), Point(3, 3, 0)), linecolor=(1, 0, 0))
plotter.add(Point(1.5, 1.5, 0))

plotter.zoom_extents()
plotter.show()
```

## Supported objects

| Category | Objects |
|---|---|
| Geometry | `Point`, `Vector`, `Line`, `Polyline`, `Polygon`, `Circle`, `Ellipse`, `Frame` |
| Shapes (drawn as XY projections) | `Box`, `Sphere`, `Cylinder`, `Cone`, `Capsule`, `Torus`, `Polyhedron` |
| Data structures | `Mesh`, `Graph` |

`Brep`, `Surface`, `NurbsCurve`, `VolMesh` and `Plane` are not yet supported —
see the [roadmap](#roadmap).

## Roadmap

Planned additions, most likely drawn as XY projections following the existing
`ShapeObject`:

- `Brep` and `Surface` (tessellate to a mesh, then project; `Brep` needs an
  optional backend such as `compas_occ`)
- `NurbsCurve` (sampled to a polyline)
- `VolMesh` and `Plane`

## Documentation

Full documentation is available at
[compas.dev/compas_plotter](https://compas.dev/compas_plotter).

## License

`compas_plotter` is released under the [MIT License](LICENSE).
