docstr: Plot the main graph displaying distances between methods across each feature and data point
  
  Parameters
  ----------
  weights : list
      List of 2 dataframes containing contributions for the selected points
  x : DataFrame
      Original input data filtered on selected points
  top_features : array
      Top features to display ordered by mean of absolute contributions across all the selected points
  methods : list
      List of explainbility methods to compare
  file_name: string
      Specify the save path of html files. If it is not provided, no file will be saved.
  auto_open: bool
      open automatically the plot
  
  Returns
  -------
  figure
docstr_tok: ["Plot","the","main","graph","displaying","distances","between","methods","across","each","feature","and","data","point","Parameters","--","--","--","--","--","weights",":","list","List","of","2","dataframes","containing","contributions","for","the","selected","points","x",":","DataFrame","Original","input","data","filtered","on","selected","points","top_features",":","array","Top","features","to","display","ordered","by","mean","of","absolute","contributions","across","all","the","selected","points","methods",":","list","List","of","explainbility","methods","to","compare","file_name",":","string","Specify","the","save","path","of","html","files",".","If","it","is","not","provided",",","no","file","will","be","saved",".","auto_open",":","bool","open","automatically","the","plot","Returns","--","--","--","-","figure"]
code: def plot_pairwise_consistency(
      self, weights, x, top_features, methods, file_name, auto_open
  ):
      """Plot the main graph displaying distances between methods across each feature and data point
  
      Parameters
      ----------
      weights : list
          List of 2 dataframes containing contributions for the selected points
      x : DataFrame
          Original input data filtered on selected points
      top_features : array
          Top features to display ordered by mean of absolute contributions across all the selected points
      methods : list
          List of explainbility methods to compare
      file_name: string
          Specify the save path of html files. If it is not provided, no file will be saved.
      auto_open: bool
          open automatically the plot
  
      Returns
      -------
      figure
      """
      # Look for existing OrdinalEncoder. If none, create one for string columns
      if isinstance(self.preprocessing, OrdinalEncoder):
          encoder = self.preprocessing
      else:
          categorical_features = [
              col for col in x.columns if x[col].dtype == "object"
          ]
          encoder = OrdinalEncoder(
              cols=categorical_features,
              handle_unknown="ignore",
              return_df=True,
          ).fit(x)
          x = encoder.transform(x)
  
      xaxis_title = (
          "Difference of contributions between the 2 methods"
          + f"<span style='font-size: 12px;'><br />{methods[0]} - {methods[1]}</span>"
      )
      yaxis_title = "Top features<span style='font-size: 12px;'><br />(Ordered by mean of absolute contributions)</span>"
  
      fig = make_subplots(specs=[[{"secondary_y": True}]])
  
      # Plot the distribution
  
      for i, c in enumerate(top_features):
          switch = False
          if c in encoder.cols:
              switch = True
  
              mapping = encoder.mapping[encoder.cols.index(c)][
                  "mapping"
              ]
              inverse_mapping = {
                  v: k for k, v in mapping.to_dict().items()
              }
              feature_value = x[c].map(inverse_mapping)
  
          hv_text = [
              f"<b>Feature value</b>: {i}<br><b>{methods[0]}</b>: {j}<br><b>{methods[1]}</b>: {k}<br><b>Diff</b>: {l}"
              for i, j, k, l in zip(
                  feature_value if switch else x[c].round(3),
                  weights[0][c].round(2),
                  weights[1][c].round(2),
                  (weights[0][c] - weights[1][c]).round(2),
              )
          ]
  
          fig.add_trace(
              go.Violin(
                  x=(weights[0][c] - weights[1][c]).values,
                  name=c,
                  points=False,
                  fillcolor="rgba(255, 0, 0, 0.1)",
                  line={"color": "black", "width": 0.5},
                  showlegend=False,
              ),
              secondary_y=False,
          )
  
          fig.add_trace(
              go.Scatter(
                  x=(weights[0][c] - weights[1][c]).values,
                  y=len(x) * [i] + np.random.normal(0, 0.1, len(x)),
                  mode="markers",
                  marker={
                      "color": x[c].values,
                      "colorscale": self.tuning_colorscale(x[c]),
                      "opacity": 0.7,
                  },
                  name=c,
                  text=len(x) * [c],
                  hovertext=hv_text,
                  hovertemplate="<b>%{text}</b><br><br>"
                  + "%{hovertext}<br>"
                  + "<extra></extra>",
                  showlegend=False,
              ),
              secondary_y=True,
          )
  
      # Dummy invisible plot to add the color scale
      colorbar_trace = go.Scatter(
          x=[None],
          y=[None],
          mode="markers",
          marker=dict(
              size=1,
              color=[x.min(), x.max()],
              colorscale=self.tuning_colorscale(
                  pd.Series(
                      np.linspace(x.min().min(), x.max().max(), 10)
                  )
              ),
              colorbar=dict(
                  thickness=20,
                  lenmode="pixels",
                  len=400,
                  yanchor="top",
                  y=1.1,
                  ypad=20,
                  title="Feature values",
                  tickvals=[x.min().min(), x.max().max()],
                  ticktext=["Low", "High"],
              ),
              showscale=True,
          ),
          hoverinfo="none",
          showlegend=False,
      )
  
      fig.add_trace(colorbar_trace)
  
      self._update_pairwise_consistency_fig(
          fig=fig,
          top_features=top_features,
          xaxis_title=xaxis_title,
          yaxis_title=yaxis_title,
          file_name=file_name,
          auto_open=auto_open,
      )
  
      return fig
  
imports: from category_encoders import OrdinalEncoder
  import copy
  import itertools
  import matplotlib.pyplot
  import numpy
  import pandas
  from plotly import graph_objs
  from plotly.offline import plot
  from plotly.subplots import make_subplots
  from sklearn.manifold import MDS
  from shapash import SmartExplainer
  from shapash.style.style_utils import colors_loading, select_palette, define_style
label_desc: Use image node_id 15 for calling the Consistency obj's underlying member method code with example usage: obj.plot_pairwise_consistency(weights, x, top_features, methods, file_name, auto_open) and returns: fig