Skip to main content
Ctrl+K
SMX - Home SMX - Home
  • Installation
  • Quickstart
  • Pipeline overview
  • Spectral zones
  • Predicates and bagging
  • Predicate graph and LRC
    • Faithfulness evaluation
    • Plotting gallery
    • Synthetic datasets
    • Examples
    • Repository map
    • API reference
  • GitHub
  • PyPI
  • Installation
  • Quickstart
  • Pipeline overview
  • Spectral zones
  • Predicates and bagging
  • Predicate graph and LRC
  • Faithfulness evaluation
  • Plotting gallery
  • Synthetic datasets
  • Examples
  • Repository map
  • API reference
  • GitHub
  • PyPI

Section Navigation

  • Plotting gallery

Plotting gallery#

SMX ships Plotly-based visualization helpers for every major output. Install plotting dependencies with:

pip install "spectral-model-explainer[plotting]"

Zone ranking over spectrum#

Highlights the LRC-ranked zones on top of a reference spectrum.

Zone ranking over spectrum

from smx import plot_zone_ranking_over_spectrum

plot_zone_ranking_over_spectrum(
    zone_ranking_df=smx.lrc_natural_,
    spectral_cuts=spectral_cuts,
    reference_spectrum=smx.zones_natural_,
    output_path="zone_ranking.html",
)

LRC bar chart#

Horizontal bar chart of LRC scores per zone.

LRC bar chart

from smx import plot_lrc_bar

plot_lrc_bar(
    zone_ranking_df=smx.lrc_natural_,
    output_path="lrc_bar.html",
)

Predicate heatmap#

Heatmap of LRC scores across thresholds within each zone.

Predicate heatmap

from smx import plot_predicate_heatmap

plot_predicate_heatmap(
    lrc_natural_df=smx.lrc_natural_,
    output_path="predicate_heatmap.html",
)

Threshold spectrum#

Reconstructs a predicate threshold into the original spectral domain.

Threshold spectrum

from smx import plot_threshold_spectrum

plot_threshold_spectrum(
    lrc_natural_df=smx.lrc_natural_,
    row_index=0,
    spectral_zones_original=smx.zones_natural_,
    pca_info_dict_original=smx.pca_info_natural_,
    y_labels=y_cal,
    output_path="threshold.html",
)

Zone scores#

Split-violin plot of PCA scores per zone, grouped by class.

Zone scores

from smx import plot_zone_scores

plot_zone_scores(
    zones=smx.zones_natural_,
    y_labels=y_cal,
    output_path="zone_scores.html",
)

All thresholds overlay#

Overlay of all top-ranked thresholds across the full spectrum.

All thresholds overlay

from smx import plot_all_thresholds_overlay

plot_all_thresholds_overlay(
    lrc_natural_df=smx.lrc_natural_,
    zones_natural=smx.zones_natural_,
    pca_info_natural=smx.pca_info_natural_,
    y_labels=y_cal,
    spectral_cuts=spectral_cuts,
    output_path="all_thresholds.html",
)

Faithfulness curve#

Progressive masking curve with AUC shading.

Faithfulness curve

from smx import plot_faithfulness_curve

plot_faithfulness_curve(
    faithfulness_result=smx.faithfulness_,
    output_path="faithfulness.html",
)

Theme customization#

All plots accept the SMXTheme object:

from smx import SMXTheme, DEFAULT_THEME

custom = SMXTheme(font_family="Georgia, serif", colorscale="Blues")
plot_zone_ranking_over_spectrum(
    zone_ranking_df=smx.lrc_natural_,
    spectral_cuts=spectral_cuts,
    reference_spectrum=smx.zones_natural_,
    output_path="zone_ranking.html",
    theme=custom,
)

previous

Faithfulness evaluation

next

Synthetic datasets

On this page
  • Zone ranking over spectrum
  • LRC bar chart
  • Predicate heatmap
  • Threshold spectrum
  • Zone scores
  • All thresholds overlay
  • Faithfulness curve
  • Theme customization
Edit on GitHub
Show Source

© Copyright 2026, Jose Vinicius Ribeiro, Rafael Figueira Goncalves, Sylvio Barbon Junior.