code: def plot_t_p(t, p, title, mcc, axes=None):
      if axes is None:
          fig = plt.figure(figsize=(6, 3), layout="constrained")
          axes = [
              fig.add_subplot(121, projection="3d"),
              fig.add_subplot(122),
          ]
          show = True
      else:
          show = False
  
      # calculate critical t-value thresholds (2-tailed)
      p_lims = np.array([0.1, 0.001])
      df = n_subjects - 1  # degrees of freedom
      t_lims = stats.distributions.t.ppf(1 - p_lims / 2, df=df)
      p_lims = [-np.log10(p) for p in p_lims]
  
      # t plot
      x, y = np.mgrid[0:width, 0:width]
      surf = axes[0].plot_surface(
          x,
          y,
          np.reshape(t, (width, width)),
          rstride=1,
          cstride=1,
          linewidth=0,
          vmin=t_lims[0],
          vmax=t_lims[1],
          cmap="viridis",
      )
      axes[0].set(
          xticks=[],
          yticks=[],
          zticks=[],
          xlim=[0, width - 1],
          ylim=[0, width - 1],
      )
      axes[0].view_init(30, 15)
      cbar = axes[0].figure.colorbar(
          ax=axes[0],
          shrink=0.75,
          orientation="horizontal",
          fraction=0.1,
          pad=0.025,
          mappable=surf,
      )
      cbar.set_ticks(t_lims)
      cbar.set_ticklabels(["%0.1f" % t_lim for t_lim in t_lims])
      cbar.set_label("t-value")
      cbar.ax.get_xaxis().set_label_coords(0.5, -0.3)
      if not show:
          axes[0].set(title=title)
          if mcc:
              axes[0].title.set_weight("bold")
      # p plot
      use_p = -np.log10(np.reshape(np.maximum(p, 1e-5), (width, width)))
      img = axes[1].imshow(
          use_p,
          cmap="inferno",
          vmin=p_lims[0],
          vmax=p_lims[1],
          interpolation="nearest",
      )
      axes[1].set(xticks=[], yticks=[])
      cbar = axes[1].figure.colorbar(
          ax=axes[1],
          shrink=0.75,
          orientation="horizontal",
          fraction=0.1,
          pad=0.025,
          mappable=img,
      )
      cbar.set_ticks(p_lims)
      cbar.set_ticklabels(["%0.1f" % p_lim for p_lim in p_lims])
      cbar.set_label(r"$-\log_{10}(p)$")
      cbar.ax.get_xaxis().set_label_coords(0.5, -0.3)
      if show:
          text = fig.suptitle(title)
          if mcc:
              text.set_weight("bold")
  
file_path: mne-python/tutorials/stats-sensor-space/10_background_stats.py
imports: from functools import partial
  import matplotlib.pyplot
  import numpy
  from mpl_toolkits.mplot3d import Axes3D
  from scipy import stats
  import mne
  from mne.stats import bonferroni_correction, fdr_correction, permutation_cluster_1samp_test, permutation_t_test, ttest_1samp_no_p
  from sklearn.feature_extraction.image import grid_to_graph
label_desc: Use image node_id 1 for calling a global function with example usage: plot_t_p(t, p, title, mcc, axes) without return types