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 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
pip install compas_plotter
Quick start
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
Planned additions, most likely drawn as XY projections following the existing
ShapeObject:
BrepandSurface(tessellate to a mesh, then project;Brepneeds an optional backend such ascompas_occ)NurbsCurve(sampled to a polyline)VolMeshandPlane
Documentation
Full documentation is available at compas.dev/compas_plotter.
License
compas_plotter is released under the MIT License.
Metadata
Release files for compas-plotter 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compas_plotter-1.0.1.tar.gz | 21.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| compas_plotter-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.8 kB
Release files / compas_plotter-1.0.1.tar.gz
| Download URL | compas_plotter-1.0.1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aa41a4e8e20a310fe7ac6804f277e2d184e2ffcf5f3574c29065842086d4316
|
|
BLAKE2b-256 checksum How to use checksums |
c4ef1115121309b9da300061bd592cdf77b2c2e540fbd4b647c8e647f3e9eed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / compas_plotter-1.0.1-py3-none-any.whl
| Download URL | compas_plotter-1.0.1-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ec035a7cda9c6393399933d654922649c53a67730136796e3660a1ae48f1fbf
|
|
BLAKE2b-256 checksum How to use checksums |
be5ca0e838bf9f6f1fae5245df7b44587ac736be24559ceb6565ce9225c0e47e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|