class_docstr: Lag correlation (ACF/PACF) plots, commonly known as lollipop, for analysing correlation on
  a given lag. Useful for auto-, partial-, cross- and partial-cross-correlation.
class_docstr_tok: ["Lag","correlation","(","ACF\/PACF",")","plots",",","commonly","known","as","lollipop",",","for","analysing","correlation","on","a","given","lag",".","Useful","for","auto-",",","partial-",",","cross-","and","partial-cross-correlation","."]
code: def _create_figure(self) -> go.Figure:
      fig = go.Figure()
  
      fig.add_shape(
          x0=0,
          y0=0,
          x1=1,
          y1=0,
          xref="paper",
          yref="y",
          line={
              "color": self._h_line_color,
              "width": self._h_line_width,
          },
      )
  
      data = self._data
  
      if (
          self._col_lo_bound in data.columns
          and self._col_up_bound in data.columns
      ):
          fig.add_trace(
              go.Scatter(
                  x=data[self._col_lag],
                  y=data[self._col_up_bound],
                  mode="lines",
                  hovertemplate=f"<b>{self._label_lag}</b>: "
                  "%{x}<br>"
                  f"<b>{self._label_up_bound}</b>: "
                  "%{y}<extra></extra>",
                  name=self._label_up_bound,
                  line={"color": self._color_up_bound},
              )
          )
          fig.add_trace(
              go.Scatter(
                  x=data[self._col_lag],
                  y=data[self._col_lo_bound],
                  mode="none",
                  hoverinfo="skip",
                  name=self._label_lo_bound,
                  line={"color": self._color_lo_bound},
                  fillcolor=self._color_area,
                  showlegend=False,
                  fill="tonexty",
              )
          )
          fig.add_trace(
              go.Scatter(
                  x=data[self._col_lag],
                  y=data[self._col_lo_bound],
                  mode="lines",
                  hovertemplate=f"<b>{self._label_lag}</b>: "
                  "%{x}<br>"
                  f"<b>{self._label_lo_bound}</b>: "
                  "%{y}<extra></extra>",
                  name=self._label_lo_bound,
                  line={"color": self._color_lo_bound},
              )
          )
  
      for lag, corr in data[[self._col_lag, self._col_corr]].values:
          fig.add_shape(
              type="line",
              xref="x",
              yref="y",
              x0=lag,
              y0=0,
              x1=lag,
              y1=corr,
              line={
                  "color": self._color_vlines,
                  "width": self._vlines_width,
              },
              layer="below",
          )
  
      fig.add_trace(
          go.Scatter(
              x=data[self._col_lag],
              y=data[self._col_corr],
              hovertemplate=f"<b>{self._label_lag}</b>: "
              "%{x}<br>"
              f"<b>{self._label_corr}</b>: "
              "%{y}<extra></extra>",
              mode="markers",
              name=self._label_corr,
              marker={
                  "color": self._color_circle,
                  "size": self._scatter_size,
              },
          )
      )
  
      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 LagCorrelation obj's underlying member method code with example usage: obj._create_figure() and returns: fig