facet.simulation.viz.SimulationDrawer#

class facet.simulation.viz.SimulationDrawer(style=None, histogram=True)[source]#

Draws the result of a univariate simulation, represented by a UnivariateSimulationResult object.

Bases:

Drawer [UnivariateSimulationResult [Any], SimulationStyle]

Metaclasses:

ABCMeta

Parameters:
  • style (Union[SimulationStyle, str, None]) – the style to be used for drawing; either as a DrawingStyle instance, or as the name of a named style supported by this drawer type; if not specified, the default style will be used as returned by get_default_style()

  • histogram (bool) – if True, plot the histogram of observed values for the feature being simulated; if False, do not plot the histogram (default: True).

Method summary

draw

Draw the simulation chart.

get_default_style

Get the default style for this drawer.

get_named_styles

See pytools.viz.Drawer.get_named_styles()

get_style

See pytools.viz.Drawer.get_style()

get_style_classes

Get all style classes available for this drawer type.

get_style_kwargs

See pytools.viz.Drawer.get_style_kwargs()

Attribute summary

style

The DrawingStyle used by this drawer.

histogram

if True, plot the histogram of observed values for the feature being simulated; if False, do not plot the histogram

Definitions

_draw(result)[source]#

Core drawing method invoked my method draw().

Must be implemented by subclasses of Drawer.

Parameters:

data – the data to be rendered

Return type:

None

draw(data, *, title=None)[source]#

Draw the simulation chart.

Parameters:
Return type:

None

classmethod get_default_style()[source]#

Get the default style for this drawer.

Return type:

SimulationMatplotStyle

Returns:

the default style for this drawer

classmethod get_named_styles()#

See pytools.viz.Drawer.get_named_styles()

classmethod get_style(name)#

See pytools.viz.Drawer.get_style()

classmethod get_style_classes()[source]#

Get all style classes available for this drawer type.

Return type:

Iterable[type[SimulationStyle]]

Returns:

an iterable of style classes

get_style_kwargs(data)#

See pytools.viz.Drawer.get_style_kwargs()

histogram: bool#

if True, plot the histogram of observed values for the feature being simulated; if False, do not plot the histogram

style: SimulationStyle#

The DrawingStyle used by this drawer.