Skip to main content

COMPAS Plotter

Made with COMPAS build License PyPI

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:

  • 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.

License

compas_plotter is released under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compas_plotter-1.0.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compas_plotter-1.0.1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file compas_plotter-1.0.1.tar.gz.

File metadata

  • Download URL: compas_plotter-1.0.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for compas_plotter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1aa41a4e8e20a310fe7ac6804f277e2d184e2ffcf5f3574c29065842086d4316
MD5 16978749164e56b4af682c9ba51f2e5f
BLAKE2b-256 c4ef1115121309b9da300061bd592cdf77b2c2e540fbd4b647c8e647f3e9eed1

See more details on using hashes here.

File details

Details for the file compas_plotter-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: compas_plotter-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for compas_plotter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ec035a7cda9c6393399933d654922649c53a67730136796e3660a1ae48f1fbf
MD5 5f49800e138fcb73aeee1cc60d7c60eb
BLAKE2b-256 be5ca0e838bf9f6f1fae5245df7b44587ac736be24559ceb6565ce9225c0e47e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 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