/plotly_panel

Primary LanguagePythonApache License 2.0Apache-2.0

Plotly Panel

This plugin provides a mechanism to add custom Plotly plots into a panel in your FiftyOne App requiring only Plotly figures implemented in Python.

plotly_panel_1.mp4

Installation

fiftyone plugins download https://github.com/ehofesmann/plotly_panel

Refer to the main README for more information about managing downloaded plugins and developing plugins locally.

Run Example

After installing this plugin, you can try the example panel yourself on the quickstart dataset.

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)

Adding your own plots

Step 1: Create your own plugin

Copy the __init__.py, custom_plots.py, and fiftyone.yml files from this repository into your own FiftyOne Plugin directory.

Step 2: Update plugin name

Update the name of the plugin in fiftyone.yml from name: "@ehofesmann/plotly_panel" to your new plugin name.

Step 3: Add your own ploty figures

In the custom_plots.py file of your new plugin, optionally implement the get_button() function to customize the button to open your panel in the FiftyOne grid. Then update the get_figures(samples) function to generate your custom Plotly figures using your favorite Python Plotly package, returning a list of figures.