class_docstr: SmartPlotter is a Bridge pattern decoupling plotting functions from SmartExplainer.
  The smartplotter class includes all the methods used to display graphics
  Each SmartPlotter method is easy to use from a Smart explainer object,
  just use the following syntax
  Attributes :
  explainer: object
      SmartExplainer instance to point to.
  Example
  --------
  >>> xpl.plot.my_plot_method(param=value)
class_docstr_tok: ["SmartPlotter","is","a","Bridge","pattern","decoupling","plotting","functions","from","SmartExplainer",".","The","smartplotter","class","includes","all","the","methods","used","to","display","graphics","Each","SmartPlotter","method","is","easy","to","use","from","a","Smart","explainer","object",",","just","use","the","following","syntax","Attributes",":","explainer",":","object","SmartExplainer","instance","to","point","to",".","Example","--","--","--","--",">",">",">","xpl.plot.my_plot_method","(","param=value",")"]
docstr: Function used for the `plot_stability_distribution` and `plot_amplitude_vs_stability`
  to update the layout of the plotly figure.
  Parameters
  ----------
  fig: plotly.graph_objs._figure.Figure
      Plotly figure to update
  x_barlen: int
      draw a line --> len of x array
  y_bar: list
      draw a line --> y values
  xaxis_title: str
      Title of xaxis
  yaxis_title: str
      Title of yaxis
  file_name: string (optional)
      Specify the save path of html files. If it is not provided, no file will be saved.
  auto_open: bool (default=False)
      open automatically the plot
  Returns
  -------
  go.Figure
code: def _update_stability_fig(
      self,
      fig,
      x_barlen,
      y_bar,
      xaxis_title,
      yaxis_title,
      file_name,
      auto_open,
  ):
      """
      Function used for the `plot_stability_distribution` and `plot_amplitude_vs_stability`
      to update the layout of the plotly figure.
      Parameters
      ----------
      fig: plotly.graph_objs._figure.Figure
          Plotly figure to update
      x_barlen: int
          draw a line --> len of x array
      y_bar: list
          draw a line --> y values
      xaxis_title: str
          Title of xaxis
      yaxis_title: str
          Title of yaxis
      file_name: string (optional)
          Specify the save path of html files. If it is not provided, no file will be saved.
      auto_open: bool (default=False)
          open automatically the plot
      Returns
      -------
      go.Figure
      """
      title = "Importance & Local Stability of explanations:"
      title += "<span style='font-size: 16px;'><br />How similar are explanations for closeby neighbours?</span>"
      dict_t = copy.deepcopy(self._style_dict["dict_title_stability"])
      dict_xaxis = copy.deepcopy(self._style_dict["dict_xaxis"])
      dict_yaxis = copy.deepcopy(self._style_dict["dict_yaxis"])
      dict_xaxis["text"] = xaxis_title
      dict_yaxis["text"] = yaxis_title
      dict_stability_bar_colors = copy.deepcopy(
          self._style_dict["dict_stability_bar_colors"]
      )
      dict_t["text"] = title
  
      fig.add_trace(
          go.Scatter(
              x=[0.15] * x_barlen,
              y=y_bar,
              mode="lines",
              hoverinfo="none",
              line=dict(color=dict_stability_bar_colors[0], dash="dot"),
              name="<-- Stable",
          )
      )
  
      fig.add_trace(
          go.Scatter(
              x=[0.3] * x_barlen,
              y=y_bar,
              mode="lines",
              hoverinfo="none",
              line=dict(color=dict_stability_bar_colors[1], dash="dot"),
              name="--> Unstable",
          )
      )
  
      fig.update_layout(
          template="none",
          title=dict_t,
          xaxis_title=dict_xaxis,
          yaxis_title=dict_yaxis,
          coloraxis_showscale=False,
          hovermode="closest",
      )
  
      fig.update_yaxes(automargin=True)
      fig.update_xaxes(automargin=True)
  
      if file_name:
          plot(fig, filename=file_name, auto_open=auto_open)
  
imports: import warnings
  from numbers import Number
  import random
  import copy
  import math
  import numpy
  from scipy.optimize import fsolve
  import scipy.cluster.hierarchy
  import pandas
  from plotly import graph_objs
  import plotly.express
  from plotly.subplots import make_subplots
  from plotly.offline import plot
  from shapash.manipulation.select_lines import select_lines
  from shapash.manipulation.summarize import compute_features_import, project_feature_values_1d, compute_corr
  from shapash.utils.utils import add_line_break, truncate_str, compute_digit_number, add_text, maximum_difference_sort_value, compute_sorted_variables_interactions_list_indices, compute_top_correlations_features
  from shapash.webapp.utils.utils import round_to_k
  from shapash.style.style_utils import colors_loading, select_palette, define_style
label_desc: Use image node_id 28 for calling the SmartPlotter obj's underlying member method code with example usage: obj._update_stability_fig(fig, x_barlen, y_bar, xaxis_title, yaxis_title, file_name, auto_open) without return types