class documentation

class PlotManager(object): (source)

Constructor: PlotManager(session)

View In Hierarchy

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
sessiona fiftyone.core.session.Session
Method __bool__ Undocumented
Method __contains__ Undocumented
Method __delitem__ Undocumented
Method __getitem__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method __str__ Undocumented
Method attach Attaches a plot to this manager.
Method clear Removes all plots from this manager.
Method connect Connects this manager to its session and all plots.
Method disconnect Disconnects this manager from its session and all plots.
Method freeze Freezes all connected plots, replacing them with static images.
Method items Returns an iterator over the (name, plot) pairs in this manager.
Method keys Returns an iterator over the names of plots in this manager.
Method pop Removes the plot from this manager and returns it.
Method remove Removes the plot from this manager.
Method summary Returns a string summary of this manager.
Method sync Syncs all connected plots with the session's current view.
Method values Returns an iterator over the plots in this manager.
Property has_frame_links Whether this manager has plots linked to frames.
Property has_label_links Whether this manager has plots linked to labels.
Property has_sample_links Whether this manager has plots linked to samples.
Property has_view_links Whether this manager has plots linked to views.
Property is_connected Whether this manager is currently connected to its plots.
Property is_disconnected Whether this manager is currently disconnected from its plots.
Method _connect_plot Undocumented
Method _disconnect_plot Undocumented
Method _get_current_label_ids_for_plot Undocumented
Method _needs_update Undocumented
Method _on_plot_selection Undocumented
Method _on_session_update Undocumented
Method _ready_for_update Undocumented
Method _set_session Undocumented
Method _summarize_plots Undocumented
Method _update_all_plots Undocumented
Method _update_ids_from_session Undocumented
Method _update_interactive_plot Undocumented
Method _update_plots Undocumented
Method _update_plots_from_session Undocumented
Method _update_session Undocumented
Method _update_view_plots Undocumented
Constant _MIN_UPDATE_DELTA_SECONDS Undocumented
Instance Variable _aggs Undocumented
Instance Variable _connected Undocumented
Instance Variable _current_frame_ids Undocumented
Instance Variable _current_labels Undocumented
Instance Variable _current_sample_ids Undocumented
Instance Variable _disconnected Undocumented
Instance Variable _last_session_view Undocumented
Instance Variable _last_update Undocumented
Instance Variable _last_updates Undocumented
Instance Variable _plots Undocumented
Instance Variable _session Undocumented
def __bool__(self): (source)

Undocumented

def __contains__(self, name): (source)

Undocumented

def __delitem__(self, name): (source)

Undocumented

def __getitem__(self, name): (source)

Undocumented

def __init__(self, session): (source)

Undocumented

def __iter__(self): (source)

Undocumented

def __len__(self): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def __setitem__(self, name, plot): (source)

Undocumented

def __str__(self): (source)

Undocumented

def attach(self, plot, name=None, connect=True, overwrite=True): (source)

Attaches a plot to this manager.

Parameters
plota fiftyone.core.plots.base.ResponsivePlot
name:Nonean optional name for the plot
connect:Truewhether to immediately connect the plot
overwrite:Truewhether to overwrite an existing plot of the same name
def clear(self): (source)

Removes all plots from this manager.

def connect(self): (source)

Connects this manager to its session and all plots.

def disconnect(self): (source)

Disconnects this manager from its session and all plots.

def freeze(self): (source)

Freezes all connected plots, replacing them with static images.

Only applicable in notebook contexts.

def items(self): (source)

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

Returns
an iterator that emits (name, ResponsivePlot) tuples
def keys(self): (source)

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

Returns
an iterator over plot names
def pop(self, name): (source)

Removes the plot from this manager and returns it.

Parameters
namethe name of a plot
Returns
the fiftyone.core.plots.base.ResponsivePlot
def remove(self, name): (source)

Removes the plot from this manager.

Parameters
namethe name of a plot
def summary(self): (source)

Returns a string summary of this manager.

Returns
a string summary
def sync(self): (source)

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

def values(self): (source)

Returns an iterator over the plots in this manager.

Returns
an iterator that emits fiftyone.core.plots.base.ResponsivePlot instances
@property
has_frame_links = (source)

Whether this manager has plots linked to frames.

@property
has_label_links = (source)

Whether this manager has plots linked to labels.

@property
has_sample_links = (source)

Whether this manager has plots linked to samples.

@property
has_view_links = (source)

Whether this manager has plots linked to views.

@property
is_connected = (source)

Whether this manager is currently connected to its plots.

@property
is_disconnected = (source)

Whether this manager is currently disconnected from its plots.

def _connect_plot(self, name): (source)

Undocumented

def _disconnect_plot(self, name): (source)

Undocumented

def _get_current_label_ids_for_plot(self, plot): (source)

Undocumented

def _needs_update(self, name): (source)

Undocumented

def _on_plot_selection(self, name, ids): (source)

Undocumented

def _on_session_update(self, _): (source)

Undocumented

def _ready_for_update(self, name): (source)

Undocumented

def _set_session(self, session): (source)

Undocumented

def _summarize_plots(self, names): (source)

Undocumented

def _update_all_plots(self): (source)

Undocumented

def _update_ids_from_session(self): (source)

Undocumented

def _update_interactive_plot(self, name, view): (source)

Undocumented

def _update_plots(self, names): (source)

Undocumented

def _update_plots_from_session(self, exclude=None): (source)

Undocumented

def _update_session(self, view): (source)

Undocumented

def _update_view_plots(self, names, view): (source)

Undocumented

_MIN_UPDATE_DELTA_SECONDS: int = (source)

Undocumented

Value
1

Undocumented

_connected: bool = (source)

Undocumented

_current_frame_ids = (source)

Undocumented

_current_labels = (source)

Undocumented

_current_sample_ids = (source)

Undocumented

_disconnected: bool = (source)

Undocumented

_last_session_view = (source)

Undocumented

_last_update = (source)

Undocumented

_last_updates: dict = (source)

Undocumented

Undocumented

_session = (source)

Undocumented