verse.plotter.plotter2D.reachtube_tree_video
- verse.plotter.plotter2D.reachtube_tree_video(root: AnalysisTree | AnalysisTreeNode, map=None, fig=Figure({'data': [], 'layout': {'template': '...'}}), x_dim: int = 1, y_dim: int = 2, print_dim_list=None, map_type='lines', scale_type='trace', label_mode='None', sample_rate=1, combine_rect=1, plot_color=None, time_step=None, speed_rate=1, output_path='reachtube_animation.html', max_slider_steps=100, max_frame_steps=None, video_config=None, print_level=0, show_legend: bool = False, extra_traces=None)
Build an export-oriented reachtube animation.
This function aggregates reachsets across all tree nodes by rounded time and creates cumulative shape frames (frame at time
tcontains all rects for times<= t). The resulting figure can be exported to HTML, GIF, or MP4.- Parameters:
- rootAnalysisTree or AnalysisTreeNode
Verification tree root.
- map, fig, x_dim, y_dim, print_dim_list, map_type, scale_type, label_mode,
- sample_rate, combine_rect, plot_color
Same as reachtube_tree().
- time_stepfloat or None
Time rounding precision source; None uses 3 decimal digits.
- speed_ratefloat
Playback speed factor (higher is faster).
- output_pathstr or None
Output path. Defaults to
reachtube_animation.html..htmlwrites an animation page;.gif/.mp4export rendered frames.- max_slider_stepsint or None
Maximum slider labels shown.
- max_frame_stepsint or None
Optional cap on animation frame count. If None, HTML defaults to 150 frames for faster browser loading, while GIF/MP4 keep all timesteps.
- video_configdict or None
Optional styling overrides for export output.
For
.htmloutput: -layout(dict): passed tofig.update_layout(**layout). -xaxis/xaxes/x_axis/x_axes(dict): passed to Plotly x-axis layout. -yaxis/yaxes/y_axis/y_axes(dict): passed to Plotly y-axis layout. - top-levelpaper_bgcolor,plot_bgcolor,width,height,margin,font: passed tofig.update_layout.For
.gif/.mp4direct export: -layoutplus axis aliases above are read and interpreted by the rasterizer. - supported visual keys:paper_bgcolor,plot_bgcolor,width,height,margin,font.size,xaxis.title,yaxis.title,xaxis.range,yaxis.range,xaxis/yaxis.showline,linewidth,linecolor,showgrid,gridwidth,gridcolor.unsupported keys are ignored in direct export.
- print_levelint
Determines which debug statements are shown, if any, while creating the GIF or MP4 video.
- show_legendbool
If True, adds one legend entry per agent using the agent color mapping. For HTML output this uses Plotly legend items. For GIF/MP4 direct export, this draws a static legend box into each frame.
- extra_traceslist or None
Optional additional traces to overlay on top of the reachtube animation. For HTML output, each entry is passed to
fig.add_trace(dict entries are interpreted asgo.Scatterkwargs). For GIF/MP4 direct export, only scatter-like line/marker traces are supported.- Returns
- ——-
- go.Figure
Figure with cumulative animation frames.