class_docstr: Lag Matrix plot.
class_docstr_tok: ["Lag","Matrix","plot","."]
code: def _create_figure(self) -> go.Figure:
      original = self.data[self.col_original]
      lags = self.data[
          [c for c in self.data.columns if c != self.col_original]
      ]
      ncols = self.ncols
      nrows = int(np.ceil(lags.shape[1] / ncols))
      color_m = self.PALETTE[0]
      opt_xaxis = deepcopy(self.VIZBASE_LAYOUT_OPTS.get("xaxis", {}))
      opt_yaxis = deepcopy(self.VIZBASE_LAYOUT_OPTS.get("yaxis", {}))
  
      fig = make_subplots(
          rows=nrows,
          cols=ncols,
          start_cell="top-left",
          shared_xaxes=True,
          shared_yaxes=True,
          horizontal_spacing=0.08,
          vertical_spacing=0.02,
      )
      for ix, col in enumerate(lags.columns):
          ix_row = ix // ncols
          ix_col = ix % ncols
          fig.add_trace(
              go.Scatter(
                  x=original,
                  y=lags[col],
                  meta={"label_xaxis": "level", "label_yaxis": col},
                  mode="markers",
                  marker={"color": color_m},
                  name=col,
                  hovertemplate=self.hovertemplate,
              ),
              row=ix_row + 1,
              col=ix_col + 1,
          )
          fig.update_xaxes(
              {
                  **opt_xaxis,  # type: ignore
                  "visible": True,
                  "tickangle": self.xrotation,
              },
              row=ix_row + 1,
              col=ix_col + 1,
              title_text="",
          )
          fig.update_yaxes(
              {
                  **opt_yaxis,  # type: ignore
              },
              row=ix_row + 1,
              col=ix_col + 1,
              title_text=f"{col}: {self.corr[col]:.3f}",
          )
  
      return fig
  
imports: from typing import Union, Optional, Any
  from copy import deepcopy
  import pandas
  import numpy
  from scipy.stats import gaussian_kde
  from tslumen.plot.interactive.base import VizBase, go, make_subplots
  from tslumen.plot.utils import cmapper
label_desc: Use image node_id 2 for calling the LagMatrix obj's underlying member method code with example usage: obj._create_figure() and returns: fig