Base plotting definitions.
Class |
|
Base class for plots that support selection of their points. |
Class |
|
Base class for all plots. |
Class |
|
Base class for all responsive plots that can push/pull updates to a linked object. |
Class |
|
Base class for plots that can be automatically populated given a fiftyone.core.collections.SampleCollection instance. |
Function | lines |
Plots the given lines(s) data. |
Function | location |
Generates an interactive scatterplot of the given location coordinates with a map rendered in the background of the plot. |
Function | plot |
Plots a confusion matrix. |
Function | plot |
Plots a precision-recall (PR) curve. |
Function | plot |
Plots a set of per-class precision-recall (PR) curves. |
Function | plot |
Plots the given regression results. |
Function | plot |
Plots a receiver operating characteristic (ROC) curve. |
Function | scatterplot |
Generates an interactive scatterplot of the given points. |
Variable | logger |
Undocumented |
Function | _parse |
Undocumented |
Plots the given lines(s) data.
You can attach plots generated by this method to an App session via its
fiftyone.core.session.Session.plots
attribute, which will
automatically sync the session's view with the currently selected points in
the plot. To enable this functionality, you must pass samples to this
method.
You can use the sizes parameter to scale the sizes of the points.
Parameters | |
x:None | the x data to plot. Can be any of the following:
|
y:None | the y data to plot. Can be any of the following:
|
samples:None | the fiftyone.core.collections.SampleCollection
whose data is being visualized |
ids:None | an array-like of IDs of same shape as y. If not provided but samples are provided, the appropriate IDs will be extracted from the samples |
linkNone | a field of samples whose data corresponds to y. Can be any of the following:
|
sizes:None | data to use to scale the sizes of the points. Can be any of the following:
|
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Generates an interactive scatterplot of the given location coordinates with a map rendered in the background of the plot.
Location data is specified via the locations parameter.
You can attach plots generated by this method to an App session via its
fiftyone.core.session.Session.plots
attribute, which will
automatically sync the session's view with the currently selected points in
the plot. To enable this functionality, you must pass samples to this
method.
You can use the labels parameters to define a coloring for the points, and you can use the sizes parameter to scale the sizes of the points.
Parameters | |
locations:None | the location data to plot. Can be any of the following:
|
samples:None | the fiftyone.core.collections.SampleCollection
whose data is being visualized |
ids:None | an array-like of IDs corresponding to the locations. If not provided but samples are provided, the appropriate IDs will be extracted from the samples |
labels:None | data to use to color the points. Can be any of the following:
|
sizes:None | data to use to scale the sizes of the points. Can be any of the following:
|
classes:None | a list of classes whose points to plot. Only applicable when labels contains strings |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Plots a confusion matrix.
If ids are provided and you are working in a notebook environment with
the default plotly backend, this method returns an interactive
fiftyone.core.plots.plotly.InteractiveHeatmap
that you can attach
to an App session via its fiftyone.core.session.Session.plots
attribute, which will automatically sync the session's view with the
currently selected cells in the confusion matrix.
Parameters | |
confusion | a num_true x num_preds confusion matrix |
labels | a max(num_true, num_preds) array-like of class labels |
ids:None | an array-like of same shape as confusion_matrix containing lists of IDs corresponding to each cell |
samples:None | the fiftyone.core.collections.SampleCollection
for which the confusion matrix was generated |
evalNone | the evaluation key of the evaluation |
gtNone | the name of the ground truth field |
predNone | the name of the predictions field |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Plots a precision-recall (PR) curve.
Parameters | |
precision | an array-like of precision values |
recall | an array-like of recall values |
thresholds:None | an array-like of decision thresholds |
label:None | a label for the curve |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Plots a set of per-class precision-recall (PR) curves.
Parameters | |
precisions | a num_classes x num_recalls array-like of per-class precision values |
recall | an array-like of recall values |
classes | the list of classes |
thresholds:None | an num_classes x num_recalls array-like of decision thresholds |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Plots the given regression results.
If IDs are provided and you are working in a notebook environment with the
default plotly backend, this method returns an interactive
fiftyone.core.plots.plotly.InteractiveScatter
that you can attach
to an App session via its fiftyone.core.session.Session.plots
attribute, which will automatically sync the session's view with the
currently selected points in the plot.
Parameters | |
ytrue | an array-like of ground truth values |
ypred | an array-like of predicted values |
samples:None | the fiftyone.core.collections.SampleCollection
for which the results were generated. Only used by the "plotly"
backend when IDs are provided |
ids:None | an array-like of sample or frame IDs corresponding to the regressions. If not provided but samples are provided, the appropriate IDs will be extracted from the samples |
labels:None | data to use to color the points. Can be any of the following:
|
sizes:None | data to use to scale the sizes of the points. Can be any of the following:
|
classes:None | a list of classes whose points to plot. Only applicable when labels contains strings |
gtNone | the name of the ground truth field |
predNone | the name of the predictions field |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Plots a receiver operating characteristic (ROC) curve.
Parameters | |
fpr | an array-like of false positive rates |
tpr | an array-like of true positive rates |
thresholds:None | an array-like of decision thresholds |
rocNone | the area under the ROC curve |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|
Generates an interactive scatterplot of the given points.
You can attach plots generated by this method to an App session via its
fiftyone.core.session.Session.plots
attribute, which will
automatically sync the session's view with the currently selected points in
the plot. To enable this functionality, you must pass samples to this
method.
This method supports 2D or 3D visualizations, but interactive point selection is only available in 2D.
You can use the labels parameters to define a coloring for the points, and you can use the sizes parameter to scale the sizes of the points.
Parameters | |
points | a num_points x num_dims array-like of points |
samples:None | the fiftyone.core.collections.SampleCollection
whose data is being visualized |
ids:None | an array-like of IDs corresponding to the points. If not provided but samples are provided, the appropriate IDs will be extracted from the samples |
linkNone | a field of samples whose data corresponds to points. Can be any of the following:
|
labels:None | data to use to color the points. Can be any of the following:
|
sizes:None | data to use to scale the sizes of the points. Can be any of the following:
|
classes:None | an list of classes whose points to plot. Only applicable when labels contains strings |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following
|