Plotter

class compas_plotters.Plotter(*args, **kwargs)[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)

Attributes

artists

list of compas_plotters.artists.PlotterArtist

axes

Returns the axes subplot matplotlib object.

bgcolor

Returns the background color.

canvas

Returns the canvas of the figure instance.

figure

Returns the matplotlib figure instance.

fontsize

title

Returns the title of the plot.

viewbox

The area of the axes that is zoomed into view.

Methods

add

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

add_as

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

add_from_list

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

draw

Draw all objects included in the plot.

find

Find a geometry object or data structure in the plot.

on

Method for decorating callback functions in dynamic plots.

pause

Pause plotting during the specified interval.

redraw

Updates and pauses the plot.

register_listener

Register a listener for pick events.

save

Saves the plot to a file.

show

Displays the plot.

zoom_extents

Zoom the view to the bounding box of all objects.