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: _prediction_regression_plot displays a Plotly scatter plot of predictions in comparison to the target variable.
  This plot represents Trues Values versus Predicted Values.
  
  This plot allows the user to understand the distribution of predictions in comparison to the target variable.
  With the web app, it is possible to select the wrong or correct predictions or a subset of predictions.
  
  Parameters
  ----------
  list_ind: list
      Contains list of index that we want to plot
code: def _prediction_regression_plot(
      self,
      list_ind,
  ):
      """
      _prediction_regression_plot displays a Plotly scatter plot of predictions in comparison to the target variable.
      This plot represents Trues Values versus Predicted Values.
  
      This plot allows the user to understand the distribution of predictions in comparison to the target variable.
      With the web app, it is possible to select the wrong or correct predictions or a subset of predictions.
  
      Parameters
      ----------
      list_ind: list
          Contains list of index that we want to plot
      """
      fig = go.Figure()
  
      subtitle = None
      if self.explainer.y_pred is None:
          if hasattr(self.explainer.model, "predict"):
              self.explainer.predict()
      prediction_error = self.explainer.prediction_error
      if prediction_error is not None:
          if (self.explainer.y_target == 0).any()[0]:
              subtitle = "Prediction Error = abs(True Values - Predicted Values)"
          else:
              subtitle = "Prediction Error = abs(True Values - Predicted Values) / True Values"
          df_equal_bins = prediction_error.describe(
              percentiles=np.arange(0.1, 1, 0.1).tolist()
          )
          equal_bins = df_equal_bins.loc[
              ~df_equal_bins.index.isin(["count", "mean", "std"])
          ].values
          equal_bins = np.unique(equal_bins)
          self.pred_colorscale = self.tuning_colorscale(
              pd.DataFrame(
                  pd.cut(
                      [val[0] for val in prediction_error.values],
                      bins=[i for i in equal_bins],
                      labels=False,
                  )
              )
          )
          col_scale = self.pred_colorscale
  
          y_pred = self.explainer.y_pred.loc[list_ind]
          y_target = self.explainer.y_target.loc[list_ind]
          prediction_error = np.array(prediction_error.loc[list_ind])
          # round predict
          if self.round_digit is None:
              self.tuning_round_digit()
          y_pred = y_pred.applymap(lambda x: round(x, self.round_digit))
  
          hv_text = [
              f"Id: {x}<br />True Values: {y:,.2f}<br />Predicted Values: {z:,.2f}<br />Prediction Error: {w:,.2f}"
              for x, y, z, w in zip(
                  y_target.index,
                  y_target.values.flatten(),
                  y_pred.values.flatten(),
                  prediction_error.flatten(),
              )
          ]
  
          fig.add_scatter(
              x=y_target.values.flatten(),
              y=y_pred.values.flatten(),
              mode="markers",
              hovertext=hv_text,
              hovertemplate="<b>%{hovertext}</b><br />",
              customdata=y_pred.index.values,
          )
  
          colorpoints = (
              pd.cut(
                  [val[0] for val in prediction_error],
                  bins=[i for i in equal_bins],
                  labels=False,
              )
              / 10
          )
          colorbar_title = "Prediction Error"
          fig.data[-1].marker.color = colorpoints.flatten()
          fig.data[-1].marker.coloraxis = "coloraxis"
          fig.layout.coloraxis.colorscale = col_scale
          fig.layout.coloraxis.colorbar = {
              "title": {"text": colorbar_title},
              "tickvals": [col_scale[0][0], col_scale[-1][0] - 0.15],
              "ticktext": [
                  float("{:0.3f}".format(equal_bins[0])),
                  float("{:0.3f}".format(equal_bins[-2])),
              ],
              "tickformat": ".2s",
              "yanchor": "top",
              "y": 1.1,
          }
          range_axis = [
              min(
                  min(y_target.values.flatten()),
                  min(y_pred.values.flatten()),
              ),
              max(
                  max(y_target.values.flatten()),
                  max(y_pred.values.flatten()),
              ),
          ]
          fig.update_xaxes(range=range_axis)
          fig.update_yaxes(range=range_axis)
          fig.update_layout(
              shapes=[
                  {
                      "type": "line",
                      "yref": "y domain",
                      "xref": "x domain",
                      "y0": 0,
                      "y1": 1,
                      "x0": 0,
                      "x1": 1,
                      "line": dict(color="grey", width=1, dash="dot"),
                  }
              ]
          )
  
      return fig, subtitle
  
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 34 for calling the SmartPlotter obj's underlying member method code with example usage: obj._prediction_regression_plot(list_ind) and returns: fig,  subtitle