Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.1rc0.tar.gz (21.3 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.1rc0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compas_plotter-1.0.1rc0.tar.gz
  • Upload date:
  • Size: 21.3 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.1rc0.tar.gz
Algorithm Hash digest
SHA256 53f6ccfce112dc38f032619b3f3cf60418bb5900990a07e4de432919ed410881
MD5 4fcddee747cce21f327aa84c642153ec
BLAKE2b-256 9a14c8a0201bb5cd3c50b9f1e322eae5dba29deb25d3abab08f14604f4c2f3e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for compas_plotter-1.0.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 118eb0b7e06d686b1089b092ac75537ba2fbef9b000fdec65c7bee9f2fbc5766
MD5 6c02d4c364fcd3f5c77651e2855bf415
BLAKE2b-256 53f5d4ee7d5fff0eb7859b7132ae04ce31c44d7c3a34cf3949cdd683d6da35d9

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.1rc0 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