xlnstorch.viz.plot_spacing_heatmap

xlnstorch.viz.plot_spacing_heatmap#

xlnstorch.viz.plot_spacing_heatmap(f_range, low, high, step=0.05, rows=5, n_cols=2, levels=50, cmap='viridis')#

Create a heatmap showing a heatmap of the spacing differences for various LNS precisions.

Parameters:
  • f_range (Tuple[int] | List[int] | int) – The range of LNS precisions to visualize. Can be a single integer, a list of integers, or a tuple of integers.

  • low (float) – The lower bound of the range to visualize.

  • high (float) – The upper bound of the range to visualize.

  • step (float, optional) – The step size for the range, by default 0.05.

  • rows (int, optional) – The number of rows to display for each precision, by default 5. This is the height of each panel in the heatmap.

  • n_cols (int, optional) – The number of columns in the heatmap layout, by default 2. This determines how many different precisions are shown side by side.

  • levels (int, optional) – The number of contour levels to use in the heatmap, by default 50.

  • cmap (str, optional) – The colormap to use for the heatmap, by default ‘viridis’.

Returns:

The axes containing the heatmap.

Return type:

matplotlib.axes.Axes

Raises:
  • ImportError – If matplotlib is not installed.

  • ValueError – If the ‘low’ value is greater than or equal to the ‘high’ value.