Plotter

class compas_plotters.Plotter(view: Tuple[Tuple[float, float], Tuple[float, float]] = ((- 8.0, 16.0), (- 5.0, 10.0)), figsize: Tuple[float, float] = (8.0, 5.0), dpi: float = 100, bgcolor: Tuple[float, float, float] = (1.0, 1.0, 1.0), show_axes: bool = False)[source]

Bases: object

Plotter for the visualization of COMPAS geometry.

Parameters
  • view (tuple, optional) – The area of the axes that should be zoomed into view. DEfault is ([-10, 10], [-3, 10]).

  • figsize (tuple, optional) – The size of the figure in inches. Default is (8, 5)

Methods

add(item[, artist])

Add a COMPAS geometry object or data structure to the plot.

add_as(item, artist_type, **kwargs)

Add a COMPAS geometry object or data structure using a specific artist type.

add_from_list(items, **kwargs)

Add multiple COMPAS geometry objects and/or data structures from a list.

draw([pause])

Draw all objects included in the plot.

find(item)

Find a geometry object or data structure in the plot.

on([interval, frames, record, recording, dpi])

Method for decorating callback functions in dynamic plots.

pause(pause)

Pause plotting during the specified interval.

redraw([pause])

Updates and pauses the plot.

register_listener(listener)

Register a listener for pick events.

save(filepath, **kwargs)

Saves the plot to a file.

show()

Displays the plot.

zoom_extents([padding])

Zoom the view to the bounding box of all objects.