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 default style. Permissible names include "matplot" for a style supporting matplotlib, and "text" if text rendering is supported (default: "matplot")

  • 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_named_styles

See pytools.viz.Drawer.get_named_styles()

get_style_classes

Get all style classes available for this drawer type.

get_style_kwargs

See pytools.viz.Drawer.get_style_kwargs()

Attribute summary

DEFAULT_STYLE

The name of the default drawing style.

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_named_styles()#

See pytools.viz.Drawer.get_named_styles()

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