Displaying

dimstack.display

DisplayMode

Bases: Enum

Display modes for the stack.

Parameters:
  • TEXT (str) –

    Text mode

  • STRING (str) –

    String mode

  • HTML (str) –

    HTML mode

  • RICH (str) –

    Rich mode

  • NOTEBOOK (str) –

    Notebook mode

  • DF (str) –

    DataFrame mode

mode(dispmode)

Set the display mode for the stack.

Parameters:
  • dispmode (DisplayMode | str) –

    Display mode to set.

display_df(data, title='', dispmode=None)

Display a dataframe.

Parameters:
  • df (DataFrame) –

    description

dimstack.plot

StackPlot

Plot a stack of dimensions. This is a wrapper around Plotly.

show()

Show the plot. This works in both Jupyter notebooks and in a Python scripts.

add_dimension(item, title=None, start_pos=None, color=None)

Add a dimension to the plot.

Parameters:
  • item (Basic) –

    The dimension to plot

  • title (str, default: None ) –

    Title of the dimension

  • start_pos (float, default: None ) –

    starting position

  • color (str, default: None ) –

    color of the dimension

add_distribution(distribution, name, legendgroup, start, stop, xbins_size=0.1, start_pos=None, color=None)

Add a distribution to the plot.

Parameters:
  • distribution (Union[Normal, Uniform, NormalScreened]) –

    The distribution to plot

  • name (str) –

    name of the distribution

  • legendgroup (str) –

    the identifier for which group this item belongs to in the legend

  • start (float) –

    start position

  • stop (float) –

    stop position

  • xbins_size (float, default: 0.1 ) –

    size of the xbins

  • start_pos (float, default: None ) –

    starting position

  • color (str, default: None ) –

    color of the distribution

Returns:
add_reviewed(item)

Add a reviewed dimension to the plot.

add_stack(stack)

Add a stack of dimensions to the plot.

Parameters:
  • stack (Stack) –

    A dimension stack item

Returns:
  • StackPlot

    self

add_reviewed_stack(stack)

Add a stack of reviewed dimensions to the plot.

Parameters:
Returns:
  • StackPlot

    self

add(item)

Add a dimension or stack to the plot.

Parameters:
Raises:
  • TypeError

    If the item is not a Basic, Reviewed, BasicStack, or ReviewedStack

Returns:
  • StackPlot

    self