> 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.logger.writers.bokeh_writer

Data writer for live plotting with Bokeh.

## Module Contents

### Classes

| Name | Description |
|------|-------------|
| [`BokehLiveWriter`](#stanzaloggerwritersbokeh_writerbokehlivewriter) | Stream sweep data to Bokeh plots. |

### Data

`__all__`

### API

```python
class stanza.logger.writers.bokeh_writer.BokehLiveWriter(backend: typing.Any, max_points: int = 1000)
```

**Bases**: `stanza.logger.writers.base.AbstractDataWriter`

Stream sweep data to Bokeh plots.

### Initialization

**Parameters:**

**Parameters:**

- **backend**: ServerBackend or InlineBackend instance
- **max_points**: Maximum points per plot (older data rolls off for 1D)


```python
initialize_session(metadata: stanza.logger.datatypes.SessionMetadata) -> None
```

Start of new session.


```python
write_measurement(data: stanza.logger.datatypes.MeasurementData) -> None
```

Write single measurement (not used for plotting).


```python
write_sweep(data: stanza.logger.datatypes.SweepData) -> None
```

Stream sweep data to plot.


```python
_create_1d_plot(data: stanza.logger.datatypes.SweepData) -> None
```

Create 1D line plot.


```python
_create_2d_plot(data: stanza.logger.datatypes.SweepData) -> None
```

Create 2D heatmap using rect glyph.


```python
_stream_1d(data: stanza.logger.datatypes.SweepData) -> None
```

Stream 1D data to line plot.


```python
_stream_2d(data: stanza.logger.datatypes.SweepData) -> None
```

Stream 2D data to heatmap.


```python
flush() -> None
```

Flush any pending updates.


```python
finalize_session(metadata: stanza.logger.datatypes.SessionMetadata | None = None) -> None
```

End of session.


```python
stanza.logger.writers.bokeh_writer.__all__
```

**Value**: `['BokehLiveWriter']`