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
- Metaclasses
- Parameters
style (
Union
[SimulationStyle
,str
,None
]) – the style to be used for drawing; either as aDrawingStyle
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
) – ifTrue
, plot the histogram of observed values for the feature being simulated; ifFalse
, do not plot the histogram (default:True
).
Method summary
Draw the simulation chart.
Get all style classes available for this drawer type.
Attribute summary
DEFAULT_STYLE
The name of the default drawing style.
style
The
DrawingStyle
used by this drawer.if
True
, plot the histogram of observed values for the feature being simulated; ifFalse
, do not plot the histogramDefinitions
- _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
- draw(data, *, title=None)[source]#
Draw the simulation chart.
- Parameters
data (
UnivariateSimulationResult
[Any
]) – the univariate simulation to drawtitle (
Optional
[str
]) – the title of the chart (optional, defaults to the name of the simulated feature)
- Return type
- classmethod get_named_styles()#
- classmethod get_style_classes()[source]#
Get all style classes available for this drawer type.
- Return type
- Returns
an iterable of style classes
- get_style_kwargs(data)#