# NotebookTrajectoryViewer¶

class maze.core.rendering.notebook_trajectory_viewer.NotebookTrajectoryViewer(episode_record: maze.core.trajectory_recording.records.trajectory_record.StateTrajectoryRecord)

Trajectory viewer for Jupyter Notebooks, built using ipython widgets.

Displays trajectory data for the given episode as an interactive view, where the step ID and any additional arguments exposed by the renderer can be interactively set. The data is rendered using the renderer recorded in the episode record.

Parameters

episode_record – Trajectory data to render.

build()None

Build and show the interactive widgets.

Builds all the widgets (one for step ID, then one for each additional argument accepted by the renderer) and activates them using the interact function. Expected to be called from a cell in a Jupyter notebook.

render(step_id, **kwargs)None

Render the view for the given step ID, with the given additional parameters.

Usually, this method is not called directly – it is expected to be called by ipython widgets.

Parameters
• step_id – ID of the step to display

• kwargs – Any additional arguments the renderer accepts