fiftyone.core.plots.manager#

Session plot manager.

Copyright 2017-2025, Voxel51, Inc.

Classes:

PlotManager(session)

Class that manages communication between a fiftyone.core.session.Session and one or more fiftyone.core.plots.base.ResponsivePlot instances.

class fiftyone.core.plots.manager.PlotManager(session)#

Bases: object

Class that manages communication between a fiftyone.core.session.Session and one or more fiftyone.core.plots.base.ResponsivePlot instances.

Each plot can be linked to either the view, samples, frames, or labels of a session:

  • View links: When a plot has link_type == "view", then, when the session’s view changes, the plot is updated based on the content of the view

  • Sample links: When points are selected in a plot with link_type == "samples", a view containing the corresponding samples is loaded in the App. Conversely, when the session’s view changes, the corresponding points are selected in the plot

  • Frame links: When points are selected in a plot with link_type == "frames", a view containing the corresponding frames is loaded in the App. Conversely, when the session’s view changes, the corresponding points are selected in the plot

  • Label links: When points are selected in a plot with link_type == "labels", a view containing the corresponding labels is loaded in the App. Conversely, when the session’s view changes, the points in the plot corresponding to all labels in the view are selected in the plot

Parameters:

session – a fiftyone.core.session.Session

Methods:

summary()

Returns a string summary of this manager.

keys()

Returns an iterator over the names of plots in this manager.

items()

Returns an iterator over the (name, plot) pairs in this manager.

values()

Returns an iterator over the plots in this manager.

attach(plot[, name, connect, overwrite])

Attaches a plot to this manager.

remove(name)

Removes the plot from this manager.

clear()

Removes all plots from this manager.

pop(name)

Removes the plot from this manager and returns it.

connect()

Connects this manager to its session and all plots.

disconnect()

Disconnects this manager from its session and all plots.

sync()

Syncs all connected plots with the session's current view.

freeze()

Freezes all connected plots, replacing them with static images.

Attributes:

is_connected

Whether this manager is currently connected to its plots.

is_disconnected

Whether this manager is currently disconnected from its plots.

has_view_links

Whether this manager has plots linked to views.

has_sample_links

Whether this manager has plots linked to samples.

has_frame_links

Whether this manager has plots linked to frames.

has_label_links

Whether this manager has plots linked to labels.

summary()#

Returns a string summary of this manager.

Returns:

a string summary

keys()#

Returns an iterator over the names of plots in this manager.

Returns:

an iterator over plot names

items()#

Returns an iterator over the (name, plot) pairs in this manager.

Returns:

an iterator that emits (name, ResponsivePlot) tuples

values()#

Returns an iterator over the plots in this manager.

Returns:

an iterator that emits fiftyone.core.plots.base.ResponsivePlot instances

property is_connected#

Whether this manager is currently connected to its plots.

property is_disconnected#

Whether this manager is currently disconnected from its plots.

Whether this manager has plots linked to views.

Whether this manager has plots linked to samples.

Whether this manager has plots linked to frames.

Whether this manager has plots linked to labels.

attach(plot, name=None, connect=True, overwrite=True)#

Attaches a plot to this manager.

Parameters:
  • plot – a fiftyone.core.plots.base.ResponsivePlot

  • name (None) – an optional name for the plot

  • connect (True) – whether to immediately connect the plot

  • overwrite (True) – whether to overwrite an existing plot of the same name

remove(name)#

Removes the plot from this manager.

Parameters:

name – the name of a plot

clear()#

Removes all plots from this manager.

pop(name)#

Removes the plot from this manager and returns it.

Parameters:

name – the name of a plot

Returns:

the fiftyone.core.plots.base.ResponsivePlot

connect()#

Connects this manager to its session and all plots.

disconnect()#

Disconnects this manager from its session and all plots.

sync()#

Syncs all connected plots with the session’s current view.

freeze()#

Freezes all connected plots, replacing them with static images.

Only applicable in notebook contexts.