class_docstr: This class is essentially an API for the AUC object.
  This class contains methods for inspecting the AUC for different criteria.
  To input the different criteria, use the static variable ``criteria``.
docstr: Plot Gains/Lift curves.
  
  :param type: one of:
  
      - "both" (default)
      - "gains"
      - "lift"
      
  :param server: if ``True``, generate plot inline using matplotlib's Anti-Grain Geometry (AGG) backend.
  :param save_plot_path: filename to save the plot to.
  :param plot: ``True`` to plot curve; ``False`` to get a gains lift table.
  
  :returns: Gains lift table + the resulting plot (can be accessed using ``result.figure()``).
docstr_tok: ["Plot","Gains\/Lift","curves",".",":","param","type",":","one","of",":","-","``","both","''","(","default",")","-","``","gains","''","-","``","lift","''",":","param","server",":","if","``","True","``",",","generate","plot","inline","using","matplotlib","'s","Anti-Grain","Geometry","(","AGG",")","backend",".",":","param","save_plot_path",":","filename","to","save","the","plot","to",".",":","param","plot",":","``","True","``","to","plot","curve",";","``","False","``","to","get","a","gains","lift","table",".",":","returns",":","Gains","lift","table","+","the","resulting","plot","(","can","be","accessed","using","``","result.figure","(",")","``",")","."]
code: def gains_lift_plot(
      self, type="both", server=False, save_plot_path=None, plot=True
  ):
      """
      Plot Gains/Lift curves.
  
      :param type: one of:
  
          - "both" (default)
          - "gains"
          - "lift"
  
      :param server: if ``True``, generate plot inline using matplotlib's Anti-Grain Geometry (AGG) backend.
      :param save_plot_path: filename to save the plot to.
      :param plot: ``True`` to plot curve; ``False`` to get a gains lift table.
  
      :returns: Gains lift table + the resulting plot (can be accessed using ``result.figure()``).
      """
      type = type.lower()
      assert type in ["both", "gains", "lift"]
      gl = self.gains_lift()
      if plot:
          plt = get_matplotlib_pyplot(server)
          if plt is None:
              return decorate_plot_result(figure=RAISE_ON_FIGURE_ACCESS)
          title = []
          ylab = []
          x = gl["cumulative_data_fraction"]
          yccr = gl["cumulative_capture_rate"]
          ycl = gl["cumulative_lift"]
          plt = get_matplotlib_pyplot(
              server=False, raise_if_not_available=True
          )
          fig = plt.figure(figsize=(10, 10))
          plt.grid(True)
          if type in ["both", "gains"]:
              plt.plot(
                  x, yccr, zorder=10, label="cumulative capture rate"
              )
              title.append("Gains")
              ylab.append("cumulative capture rate")
          if type in ["both", "lift"]:
              plt.plot(x, ycl, zorder=10, label="cumulative lift")
              title.append("Lift")
              ylab.append("cumulative lift")
          plt.legend(loc=4, fancybox=True, framealpha=0.5)
          plt.xlim(0, None)
          plt.ylim(0, None)
          plt.xlabel("cumulative data fraction")
          plt.ylabel(", ".join(ylab))
          plt.title(" / ".join(title))
          if not server:
              plt.show()
          if (
              save_plot_path is not None
          ):  # only save when a figure is actually plotted
              fig.savefig(fname=save_plot_path)
          return decorate_plot_result(res=gl, figure=fig)
      else:
          return decorate_plot_result(res=gl)
  
imports: import h2o
  from h2o.model import MetricsBase, ConfusionMatrix
  from h2o.plot import get_matplotlib_pyplot, decorate_plot_result, RAISE_ON_FIGURE_ACCESS
  from h2o.utils.metaclass import deprecated_params
  from h2o.utils.shared_utils import List
  from h2o.utils.typechecks import assert_is_type, numeric, is_type, assert_satisfies
label_desc: Use image node_id 33 for calling the H2OBinomialModelMetrics obj's underlying member method code with example usage: obj.gains_lift_plot(type, server, save_plot_path, plot) and returns: decorate_plot_result, decorate_plot_result, decorate_plot_result