Skip to content

Plotting

jitterbug.visualization.plotter

Core plotting functionality for Jitterbug network analysis visualization.

JitterbugPlotter

Main plotting class for Jitterbug network analysis visualization.

This class provides comprehensive plotting capabilities for RTT data, change points, congestion inferences, and analysis results.

plot_rtt_timeseries(datasets, title='RTT Time Series', save_path=None, show_points=False)

Plot RTT time series data.

Parameters:

Name Type Description Default
datasets dict

Dictionary of dataset_name -> RTTDataset

required
title str

Plot title

'RTT Time Series'
save_path Path

Path to save the plot

None
show_points bool

Whether to show individual data points

False

Returns:

Type Description
Figure

The created figure

plot_congestion_analysis(raw_data, min_rtt_data, results, title='Congestion Analysis', save_path=None)

Plot comprehensive congestion analysis (similar to notebooks).

Parameters:

Name Type Description Default
raw_data RTTDataset

Raw RTT measurements

required
min_rtt_data MinimumRTTDataset

Minimum RTT data

required
results CongestionInferenceResult

Analysis results

required
title str

Plot title

'Congestion Analysis'
save_path Path

Path to save the plot

None

Returns:

Type Description
Figure

The created figure

plot_change_points(dataset, change_points, title='Change Point Detection', save_path=None)

Plot change points overlaid on RTT data.

Parameters:

Name Type Description Default
dataset MinimumRTTDataset

RTT dataset

required
change_points List[ChangePoint]

Detected change points

required
title str

Plot title

'Change Point Detection'
save_path Path

Path to save the plot

None

Returns:

Type Description
Figure

The created figure

plot_confidence_heatmap(results, title='Confidence Heatmap', save_path=None)

Plot confidence scores as a heatmap.

Parameters:

Name Type Description Default
results CongestionInferenceResult

Analysis results

required
title str

Plot title

'Confidence Heatmap'
save_path Path

Path to save the plot

None

Returns:

Type Description
Figure

The created figure

plot_algorithm_comparison(dataset, algorithm_results, title='Algorithm Comparison', save_path=None)

Compare different algorithms' change point detection.

Parameters:

Name Type Description Default
dataset MinimumRTTDataset

RTT dataset

required
algorithm_results Dict[str, List[ChangePoint]]

Results from different algorithms

required
title str

Plot title

'Algorithm Comparison'
save_path Path

Path to save the plot

None

Returns:

Type Description
Figure

The created figure

plot_summary_statistics(results, title='Analysis Summary', save_path=None)

Plot summary statistics and metrics.

Parameters:

Name Type Description Default
results CongestionInferenceResult

Analysis results

required
title str

Plot title

'Analysis Summary'
save_path Path

Path to save the plot

None

Returns:

Type Description
Figure

The created figure

save_all_plots(raw_data, min_rtt_data, results, change_points, output_dir, prefix='jitterbug')

Generate and save all standard plots.

Parameters:

Name Type Description Default
raw_data RTTDataset

Raw RTT measurements

required
min_rtt_data MinimumRTTDataset

Minimum RTT data

required
results CongestionInferenceResult

Analysis results

required
change_points List[ChangePoint]

Detected change points

required
output_dir Path

Output directory

required
prefix str

Filename prefix

'jitterbug'

Returns:

Type Description
Dict[str, Path]

Dictionary of plot_name -> file_path