boofun.visualization.interactive

Interactive visualizations using Plotly.

This module provides interactive visualizations for Boolean function analysis, including Fourier spectrum exploration, influence heatmaps, and comparison tools.

Functions

interactive_complexity_comparison(f[, ...])

Create interactive comparison of complexity measures.

interactive_fourier_spectrum(f[, ...])

Create an interactive Fourier spectrum visualization.

interactive_growth_explorer(family[, ...])

Create interactive explorer for function family growth.

interactive_influence_heatmap(f[, height, width])

Create an interactive heatmap of variable influences.

Classes

FourierExplorer(f)

Interactive Fourier coefficient explorer.

boofun.visualization.interactive.interactive_fourier_spectrum(f: BooleanFunction, show_labels: bool = True, highlight_threshold: float = 0.1, color_by_degree: bool = True, height: int = 600, width: int = 900) go.Figure[source]

Create an interactive Fourier spectrum visualization.

Features: - Hover to see coefficient details - Click to highlight specific coefficients - Zoom and pan - Color by degree or magnitude

Parameters:
  • f – BooleanFunction to visualize

  • show_labels – Show subset labels on bars

  • highlight_threshold – Highlight coefficients above this magnitude

  • color_by_degree – Color bars by Fourier degree

  • height – Figure height

  • width – Figure width

Returns:

Plotly figure

boofun.visualization.interactive.interactive_influence_heatmap(f: BooleanFunction, height: int = 400, width: int = 600) go.Figure[source]

Create an interactive heatmap of variable influences.

Parameters:
  • f – BooleanFunction to visualize

  • height – Figure height

  • width – Figure width

Returns:

Plotly figure

boofun.visualization.interactive.interactive_complexity_comparison(f: BooleanFunction, height: int = 500, width: int = 800) go.Figure[source]

Create interactive comparison of complexity measures.

Parameters:
  • f – BooleanFunction to analyze

  • height – Figure height

  • width – Figure width

Returns:

Plotly figure with radar chart of complexity measures

boofun.visualization.interactive.interactive_growth_explorer(family: FunctionFamily, n_range: Tuple[int, int, int] = (3, 15, 2), properties: List[str] = None, height: int = 600, width: int = 1000) go.Figure[source]

Create interactive explorer for function family growth.

Features: - Slider to animate through n values - Multiple property plots - Theoretical overlays

Parameters:
  • family – Function family to explore

  • n_range – (start, stop, step) for n values

  • properties – Properties to plot (default: influence, degree)

  • height – Figure height

  • width – Figure width

Returns:

Plotly figure with animation

class boofun.visualization.interactive.FourierExplorer(f: BooleanFunction)[source]

Interactive Fourier coefficient explorer.

Provides a comprehensive interface for exploring the Fourier structure of Boolean functions.

__init__(f: BooleanFunction)[source]

Initialize explorer with a Boolean function.

Parameters:

f – BooleanFunction to explore

spectrum_plot(**kwargs) go.Figure[source]

Get interactive spectrum plot.

influence_plot(**kwargs) go.Figure[source]

Get interactive influence heatmap.

complexity_plot(**kwargs) go.Figure[source]

Get interactive complexity comparison.

degree_distribution(height: int = 400, width: int = 600) go.Figure[source]

Plot spectral weight by degree.

Parameters:
  • height – Figure height

  • width – Figure width

Returns:

Plotly figure

top_coefficients(k: int = 10, height: int = 400, width: int = 600) go.Figure[source]

Plot the top k Fourier coefficients by magnitude.

Parameters:
  • k – Number of top coefficients to show

  • height – Figure height

  • width – Figure width

Returns:

Plotly figure

dashboard(height: int = 800, width: int = 1200) go.Figure[source]

Create a comprehensive dashboard with multiple views.

Parameters:
  • height – Total figure height

  • width – Total figure width

Returns:

Plotly figure with subplots