plottingfuncs

topostats.plottingfuncs.add_bounding_boxes_to_plot(fig, ax, region_properties) None[source]

Add the bounding boxes to a plot.

Parameters
  • fig

  • ax

  • region_properties – Region properties to add bounding boxes from.

topostats.plottingfuncs.plot_and_save(data: numpy.array, filename: Union[str, pathlib.Path], title: Optional[str] = None, interpolation: str = 'nearest', cmap: str = 'afmhot', region_properties: Optional[dict] = None)[source]

Plot and save an image.

Parameters
  • data (np.array) – Numpy array to plot.

  • filename (Union[str, Path]) – Filename to save image as.

  • title (str) – Title for plot.

  • interpolation (str) – Interpolation to use (default ‘nearest’).

  • cmap (str) – Colour map to use (default ‘afmhot’)