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 interactions plot to update the layout of the plotly figure.
  Parameters
  ----------
  col_name1 : str
      Name of the first column whose contributions we want to plot
  col_name2 : str
      Name of the second column whose contributions we want to plot
  addnote : str
      Text to be added to the figure title
  width : Int (default: 900)
      Plotly figure - layout width
  height : Int (default: 600)
      Plotly figure - layout height
  file_name: string (optional)
      File name to use to save the plotly bar chart. If None the bar chart will not be saved.
  auto_open: Boolean (optional)
      Indicate whether to open the bar plot or not.
  Returns
  -------
  go.Figure
code: def _update_interactions_fig(
      self,
      fig,
      col_name1,
      col_name2,
      addnote,
      width,
      height,
      file_name,
      auto_open,
  ):
      """
      Function used for the interactions plot to update the layout of the plotly figure.
      Parameters
      ----------
      col_name1 : str
          Name of the first column whose contributions we want to plot
      col_name2 : str
          Name of the second column whose contributions we want to plot
      addnote : str
          Text to be added to the figure title
      width : Int (default: 900)
          Plotly figure - layout width
      height : Int (default: 600)
          Plotly figure - layout height
      file_name: string (optional)
          File name to use to save the plotly bar chart. If None the bar chart will not be saved.
      auto_open: Boolean (optional)
          Indicate whether to open the bar plot or not.
      Returns
      -------
      go.Figure
      """
  
      if (
          fig.data[-1]["showlegend"] is False
      ):  # Case where col2 is not categorical
          fig.layout.coloraxis.colorscale = self._style_dict[
              "interactions_col_scale"
          ]
      else:
          fig.update_layout(legend=dict(title=dict(text=col_name2)))
  
      title = f"<b>{truncate_str(col_name1)} and {truncate_str(col_name2)}</b> shap interaction values"
      if addnote:
          title += f"<span style='font-size: 12px;'><br />{add_text([addnote], sep=' - ')}</span>"
      dict_t = copy.deepcopy(self._style_dict["dict_title"])
      dict_t["text"] = title
  
      dict_xaxis = copy.deepcopy(self._style_dict["dict_xaxis"])
      dict_xaxis["text"] = truncate_str(col_name1, 110)
      dict_yaxis = copy.deepcopy(self._style_dict["dict_yaxis"])
      dict_yaxis["text"] = "Shap interaction value"
  
      fig.update_traces(
          marker={
              "size": 8,
              "opacity": 0.8,
              "line": {"width": 0.8, "color": "white"},
          }
      )
  
      fig.update_layout(
          coloraxis=dict(colorbar={"title": {"text": col_name2}}),
          yaxis_title=dict_yaxis,
          title=dict_t,
          template="none",
          width=width,
          height=height,
          xaxis_title=dict_xaxis,
          hovermode="closest",
      )
  
      fig.update_yaxes(automargin=True)
      fig.update_xaxes(automargin=True)
  
      if file_name:
          plot(fig, filename=file_name, auto_open=auto_open)
  
      return fig
  
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 21 for calling the SmartPlotter obj's underlying member method code with example usage: obj._update_interactions_fig(fig, col_name1, col_name2, addnote, width, height, file_name, auto_open) and returns: fig