Matplotlib plots.
Class |
|
Interactive wrapper for a matplotlib collection. |
Class |
|
Base class for interactive matplotlib plots. |
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 |
Variable | salem |
Undocumented |
Function | _ensure |
Undocumented |
Function | _get |
Undocumented |
Function | _plot |
Undocumented |
Function | _plot |
Undocumented |
Function | _plot |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
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:
|
labels:None | a label or list of labels for the line traces |
colors:None | a list of colors recognized by matplotlib to use for the line traces. See https://matplotlib.org/stable/tutorials/colors/colormaps.html for more information |
markerNone | the marker size to use. If sizes are provided, this value is used as a reference to scale the sizes of all points |
title:None | a title for the plot |
xlabel:None | an x-axis label |
ylabel:None | a y-axis label |
ax:None | a matplotlib axis to plot in |
axFalse | whether to set axis("equal") |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
buttons:None | a list of (label, icon_image, callback) tuples defining buttons to add to the plot |
**kwargs | optional keyword arguments for matplotlib's plot() and scatter() |
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 |
map | the map type to render. Supported values are ("roadmap", "satellite", "hybrid", "terrain") |
showFalse | whether to render a scale bar on the plot |
apiNone | a Google Maps API key to use |
markerNone | the marker size to use. If sizes are provided, this value is used as a reference to scale the sizes of all points |
cmap:None | a colormap recognized by matplotlib |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
axFalse | whether to set axis("equal") |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
buttons:None | a list of (label, icon_image, callback) tuples defining buttons to add to the plot |
**kwargs | optional keyword arguments for matplotlib's scatter() |
Returns | |
one of the following
|
Plots a confusion matrix.
Parameters | |
confusion | a num_true x num_preds confusion matrix |
labels | a max(num_true, num_preds) array-like of class labels |
showTrue | whether to show counts in the confusion matrix cells |
showTrue | whether to show a colorbar |
cmap:None | a colormap recognized by matplotlib |
title:None | a title for the plot |
xticks | a rotation for the x-tick labels. Can be numeric degrees, "vertical", "horizontal", or None |
valuesNone | a format string like ".2g" or "d" to use to format the cell counts |
ax:None | a matplotlib axis to plot in |
figsize:None | a (width, height) for the figure, in inches |
Returns | |
a matplotlib figure |
Plots a precision-recall (PR) curve.
Parameters | |
precision | an array-like of precision values |
recall | an array-like of recall values |
label:None | a label for the curve |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
**kwargs | optional keyword arguments for matplotlib's plot() |
Returns | |
a matplotlib figure |
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 |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
**kwargs | optional keyword arguments for matplotlib's plot() |
Returns | |
a matplotlib figure |
Plots the given regression results.
Parameters | |
ytrue | an array-like of ground truth values |
ypred | an array-like of predicted values |
samples:None | the fiftyone.core.collections.SampleCollection
whose data is being visualized |
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 |
bestNone | a custom legend label for the best fit line |
markerNone | the marker size to use. If sizes are provided, this value is used as a reference to scale the sizes of all points |
cmap:None | a colormap recognized by matplotlib |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
**kwargs | optional keyword arguments for matplotlib's scatter() |
Returns | |
a matplotlib figure |
Plots a receiver operating characteristic (ROC) curve.
Parameters | |
fpr | an array-like of false positive rates |
tpr | an array-like of true positive rates |
rocNone | the area under the ROC curve |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
**kwargs | optional keyword arguments for matplotlib's plot() |
Returns | |
a matplotlib figure |
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 | a list of classes whose points to plot. Only applicable when labels contains strings |
markerNone | the marker size to use. If sizes are provided, this value is used as a reference to scale the sizes of all points |
cmap:None | a colormap recognized by matplotlib |
title:None | a title for the plot |
ax:None | a matplotlib axis to plot in |
axFalse | whether to set axis("equal") |
figsize:None | a (width, height) for the figure, in inches |
style:None | a style to use for the plot |
buttons:None | a list of (label, icon_image, callback) tuples defining buttons to add to the plot |
**kwargs | optional keyword arguments for matplotlib's scatter() |
Returns | |
one of the following
|
Undocumented