bencher.results.holoview_results.distribution_result.scatter_jitter_result
Classes
A class for creating scatter jitter plots from benchmark results. |
Module Contents
- class bencher.results.holoview_results.distribution_result.scatter_jitter_result.ScatterJitterResult(bench_cfg: bencher.bench_cfg.BenchCfg)
Bases:
bencher.results.holoview_results.distribution_result.distribution_result.DistributionResultA class for creating scatter jitter plots from benchmark results.
Scatter jitter plots display individual data points with slight random offsets to avoid overlapping, making it easier to visualize the distribution of data. This is particularly useful for smaller datasets where showing individual points provides more insight than aggregate statistics, or alongside box plots to show the actual data distribution.
Key features: - Displays individual data points rather than statistical summaries - Applies controlled random offsets to avoid point overlap - Useful for revealing the actual sample size and distribution - Complements statistical plots like box plots or violin plots
- to_plot(result_var: param.Parameter | None = None, override: bool = True, jitter: float = 0.1, target_dimension: int | None = None, **kwargs: Any) panel.panel | None
Generates a scatter jitter plot from benchmark data.
This method applies filters to ensure the data is appropriate for a scatter plot and then passes the filtered data to to_scatter_jitter_ds for rendering.
- Parameters:
result_var – The result variable to plot. If None, uses the default.
override – Whether to override filter restrictions. Defaults to True.
jitter – Amount of jitter to apply to points. Defaults to 0.1.
**kwargs – Additional keyword arguments passed to the plot rendering.
- Returns:
A panel containing the scatter jitter plot if data is appropriate, otherwise returns filter match results.
- to_scatter_jitter_ds(dataset: xarray.Dataset, result_var: param.Parameter, jitter: float = 0.1, **kwargs: Any) holoviews.Scatter
Creates a scatter jitter plot from the provided dataset.
Given a filtered dataset, this method generates a scatter visualization showing individual data points with random jitter to avoid overlapping, making the distribution of values more visible.
- Parameters:
dataset – The dataset containing benchmark results.
result_var – The result variable to plot.
jitter – Amount of jitter to apply to points. Defaults to 0.1.
**kwargs – Additional keyword arguments for plot customization, such as: - color: Color for data points - size: Size of data points - alpha: Transparency of data points - marker: Shape of data points (‘o’, ‘s’, ‘d’, etc.)
- Returns:
A HoloViews Scatter plot of the benchmark data with jittered points.