class CategoricalHistogram(PlotlyViewPlot): (source)
Constructor: CategoricalHistogram(field_or_expr, expr, order, xlabel, ...)
A histogram of a categorial field.
Parameters | |
field | a field name, embedded.field.name,
fiftyone.core.expressions.ViewExpression , or
MongoDB expression
defining the field or expression to plot |
expr | an optional
fiftyone.core.expressions.ViewExpression or
MongoDB expression
to apply to field_or_expr (which must be a field) before
plotting |
order | the x-axis ordering strategy to use. Can be "alphabetical" to sort by field value, or "frequency" to sort in descending order of frequency, or a function suitable for sorted(items, key=order), where items is a list of (value, count) tuples |
xlabel | an optional x-label for the plot |
log | whether to use a log scale y-axis |
bargap | relative spacing between bars in [0, 1] |
color | a color for the bars. Can be any color supported by
plotly:plotly.graph_objects.bar.Marker.color |
opacity | an optional opacity for the bars in [0, 1] |
init | an optional initial
fiftyone.core.collections.SampleCollection to load |
**kwargs | optional parameters for
plotly:plotly.graph_objects.Figure.update_layout |
Method | __init__ |
Undocumented |
Instance Variable | bargap |
Undocumented |
Instance Variable | color |
Undocumented |
Instance Variable | expr |
Undocumented |
Instance Variable | field |
Undocumented |
Instance Variable | layout |
Undocumented |
Instance Variable | log |
Undocumented |
Instance Variable | opacity |
Undocumented |
Instance Variable | order |
Undocumented |
Instance Variable | xlabel |
Undocumented |
Method | _get |
Gets the fiftyone.core.aggregations.Aggregation instances that can compute the necessary data to serve this plot. |
Method | _get |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _reopen |
Undocumented |
Instance Variable | _aggregations |
Undocumented |
Instance Variable | _figure |
Undocumented |
Instance Variable | _order |
Undocumented |
Instance Variable | _reverse |
Undocumented |
Instance Variable | _traces |
Undocumented |
Instance Variable | _widget |
Undocumented |
Inherited from PlotlyViewPlot
:
Method | show |
Shows this plot. |
Method | _update |
Undocumented |
Inherited from PlotlyWidgetMixin
(via PlotlyViewPlot
):
Method | save |
Saves the plot as an image or HTML. |
Method | _freeze |
Undocumented |
Method | _screenshot |
Undocumented |
Method | _show |
Undocumented |
Method | _update |
Undocumented |
Instance Variable | _handle |
Undocumented |
Inherited from ViewPlot
(via PlotlyViewPlot
, PlotlyWidgetMixin
):
Method | reset |
Resets the plot to its default state. |
Method | update |
Updates the plot based on the provided view. |
Property | supports |
Whether this plot supports automatic updates in response to session changes. |
Inherited from ResponsivePlot
(via PlotlyViewPlot
, PlotlyWidgetMixin
, ViewPlot
):
Method | connect |
Connects this plot, if necessary. |
Method | disconnect |
Disconnects the plot, if necessary. |
Method | freeze |
Freezes the plot, replacing it with a static image. |
Property | is |
Whether this plot is currently connected. |
Property | is |
Whether this plot is currently disconnected. |
Property | is |
Whether this plot is currently frozen. |
Property | link |
The link type between this plot and a connected session. |
Method | _connect |
Undocumented |
Method | _disconnect |
Undocumented |
Instance Variable | _connected |
Undocumented |
Instance Variable | _disconnected |
Undocumented |
Instance Variable | _frozen |
Undocumented |
Instance Variable | _link |
Undocumented |
Inherited from Plot
(via PlotlyViewPlot
, PlotlyWidgetMixin
, ViewPlot
, ResponsivePlot
):
Method | _repr |
Undocumented |
Undocumented
Gets the fiftyone.core.aggregations.Aggregation
instances
that can compute the necessary data to serve this plot.
Subclasses are not required to implement this method if they do not leverage aggregations.
Returns | |
a list fiftyone.core.aggregations.Aggregation instances,
or None |