visualise#
- visualise(domain, color_by=('Collection',), objects_to_plot=None, marker_size=None, vmin=None, vmax=None, show_boundary=False, ax=None, figure_kwargs=None, add_cbar=True, shape_kwargs={}, scatter_kwargs={}, cbar_kwargs={}, show_temporary_shapes=False, add_scalebar=False, scalebar_kwargs={})#
Visualise a muspan domain. The domain is plotted with the objects as points and shapes. The points are coloured by the object properties. The color_by argument is a tuple of properties to colour the points by. The vmin and vmax arguments are the minimum and maximum values for the colour scale. The objects_to_plot argument is a list of object ids to plot. The cmap argument is the colour map to use. The marker_size argument is the size of the markers. The show_boundary argument is a boolean to show the domain boundary. The ax argument is the axis to plot the figure on. The add_cbar argument is a boolean to add a colour bar to the plot.
- Parameters:
- domainobject
The point cloud or domain to be visualized.
- color_bystr, tuple, optional
Tuple of properties to color the points by, defaults to (‘Collection’,). If str, this is interpreted as (‘label’,string).
- objects_to_plotquery-like, optional
List or query of object ids to plot, defaults to None.
- cmapColormap, optional
Colormap to use, defaults to None.
- marker_sizeint or float, optional
Size of the markers, defaults to None.
- vminint or float, optional
Minimum value for the color scale, defaults to 0.
- vmaxint or float, optional
Maximum value for the color scale, defaults to 1.
- show_boundarybool, optional
Boolean to show the domain boundary, defaults to False.
- axmatplotlib.axes.Axes, optional
Axis to plot the figure on, defaults to None.
- figure_kwargsdict, optional
Dictionary of arguments to pass to the plt.figure function, defaults to None.
- add_cbarbool, optional
Boolean to add a color bar to the plot, defaults to True.
- shape_kwargsdict, optional
Dictionary of arguments which get passed to matplotlib.patches.PathPatch when drawing shapes
- scatter_kwargsdict, optional
Dictionary of arguments which get passed to matplotlib.pyplot.scatter when plotting points
- cbar_kwargsdict, optional
Dictionary of arguments to pass to matplotlib.pyplot.colorbar for plotting the colorbar
- show_temporary_shapesbool, optional
If True, allow shapes in ‘__temp…’ collections to be visualised. If False, temporary objects made by MuSpAn included in ‘__temporary…’ collections will be invisible. Defaults to False.
- add_scalebarbool, optional
Boolean to add a scale bar to the plot, defaults to False.
- scalebar_kwargsdict, optional
Dictionary of arguments to pass to the AnchoredSizeBar function for plotting the scale bar, defaults to {}.
- Returns:
- figmatplotlib.figure.Figure
The figure object.
- axmatplotlib.axes.Axes
The axis object.