> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conductorquantum.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conductorquantum.com/_mcp/server.

# stanza.plotter

Live plotting for data logging.

Two backends available:
- server: Plots in browser window (works everywhere)
- inline: Plots in notebook cells (requires jupyter_bokeh)

## Subpackages

- **[`backends`](backends)** - Bokeh backend protocols and base classes.

## Module Contents

### Functions

| Name | Description |
|------|-------------|
| [`enable_live_plotting`](#stanzaplotterenable_live_plotting) | Enable live plotting for a data logger. |

### Data

`logger`
`_active_servers`
`__all__`

### API

```python
stanza.plotter.logger
```

**Value**: `getLogger(...)`


```python
stanza.plotter._active_servers: dict[int, stanza.plotter.backends.server.ServerBackend]
```

**Value**: `None`


```python
stanza.plotter.enable_live_plotting(
    data_logger: stanza.logger.data_logger.DataLogger,
    backend: typing.Literal[server, inline] = 'server',
    port: int = 5006,
    session_token_expiration: int = sys.maxsize
) -> stanza.plotter.backends.server.ServerBackend | stanza.plotter.backends.inline.InlineBackend
```

Enable live plotting for a data logger.

**Parameters:**

<ParamField path="data_logger" type="stanza.logger.data_logger.DataLogger">
  DataLogger instance
</ParamField>

<ParamField path="backend" type="typing.Literal[server, inline]" default="'server'">
  "server" (browser) or "inline" (notebook)
</ParamField>

<ParamField path="port" type="int" default="5006">
  Server port (server backend only)
</ParamField>

<ParamField path="session_token_expiration" type="int" default="sys.maxsize">
  Duration in seconds that a session token is valid
</ParamField>

**Returns:**

Backend instance
Example (server):
>>> backend = enable_live_plotting(logger, backend="server", port=5006)
>>> # Open http://localhost:5006 in browser
Example (inline):
>>> backend = enable_live_plotting(logger, backend="inline")
>>> # Plots appear in notebook cells


```python
stanza.plotter.__all__
```

**Value**: `['enable_live_plotting']`