code: def draw_additive_plot(
      data, figsize, show, text_rotation=0, min_perc=0.05
  ):
      """Draw additive plot."""
      # Turn off interactive plot
      if show is False:
          plt.ioff()
  
      # Format data
      neg_features, total_neg, pos_features, total_pos = format_data(
          data
      )
  
      # Compute overall metrics
      base_value = data["baseValue"]
      out_value = data["outValue"]
      offset_text = (np.abs(total_neg) + np.abs(total_pos)) * 0.04
  
      # Define plots
      fig, ax = plt.subplots(figsize=figsize)
  
      # Compute axis limit
      update_axis_limits(
          ax,
          total_pos,
          pos_features,
          total_neg,
          neg_features,
          base_value,
          out_value,
      )
  
      # Define width of bar
      width_bar = 0.1
      width_separators = (ax.get_xlim()[1] - ax.get_xlim()[0]) / 200
  
      # Create bar for negative shap values
      rectangle_list, separator_list = draw_bars(
          out_value,
          neg_features,
          "negative",
          width_separators,
          width_bar,
      )
      for i in rectangle_list:
          ax.add_patch(i)
  
      for i in separator_list:
          ax.add_patch(i)
  
      # Create bar for positive shap values
      rectangle_list, separator_list = draw_bars(
          out_value,
          pos_features,
          "positive",
          width_separators,
          width_bar,
      )
      for i in rectangle_list:
          ax.add_patch(i)
  
      for i in separator_list:
          ax.add_patch(i)
  
      # Add labels
      total_effect = np.abs(total_neg) + total_pos
      fig, ax = draw_labels(
          fig,
          ax,
          out_value,
          neg_features,
          "negative",
          offset_text,
          total_effect,
          min_perc=min_perc,
          text_rotation=text_rotation,
      )
  
      fig, ax = draw_labels(
          fig,
          ax,
          out_value,
          pos_features,
          "positive",
          offset_text,
          total_effect,
          min_perc=min_perc,
          text_rotation=text_rotation,
      )
  
      # higher lower legend
      draw_higher_lower_element(out_value, offset_text)
  
      # Add label for base value
      draw_base_element(base_value, ax)
  
      # Add output label
      out_names = data["outNames"][0]
      draw_output_element(out_names, out_value, ax)
  
      # Scale axis
      if data["link"] == "logit":
          plt.xscale("logit")
          ax.xaxis.set_major_formatter(
              matplotlib.ticker.ScalarFormatter()
          )
          ax.ticklabel_format(style="plain")
  
      if show:
          plt.show()
      else:
          return plt.gcf()
  
file_path: shap/shap/plots/_force_matplotlib.py
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import lines
  from matplotlib.font_manager import FontProperties
  from matplotlib.patches import PathPatch
  from matplotlib.path import Path
label_desc: Use image node_id 8 for calling a global function with example usage: draw_additive_plot(data, figsize, show, text_rotation, min_perc) and returns: plt