class_docstr: Dimension reduction model, such as PCA or GLRM.
class_docstr_tok: ["Dimension","reduction","model",",","such","as","PCA","or","GLRM","."]
docstr: Produce the scree plot.
  
  Library ``matplotlib`` is required for this function.
  
  :param str type: either ``"barplot"`` or ``"lines"``.
  :param bool server: if ``True``, set ``server`` settings to matplotlib and do not show the graph.
  :param save_plot_path: a path to save the plot via using matplotlib function savefig.
  
  :returns: Object that contains the resulting scree plot (can be accessed like ``result.figure()``).
docstr_tok: ["Produce","the","scree","plot",".","Library","``","matplotlib","``","is","required","for","this","function",".",":","param","str","type",":","either","``","``","barplot","''","``","or","``","``","lines","''","``",".",":","param","bool","server",":","if","``","True","``",",","set","``","server","``","settings","to","matplotlib","and","do","not","show","the","graph",".",":","param","save_plot_path",":","a","path","to","save","the","plot","via","using","matplotlib","function","savefig",".",":","returns",":","Object","that","contains","the","resulting","scree","plot","(","can","be","accessed","like","``","result.figure","(",")","``",")","."]
code: def screeplot(
      self, type="barplot", server=False, save_plot_path=None
  ):
      """
      Produce the scree plot.
  
      Library ``matplotlib`` is required for this function.
  
      :param str type: either ``"barplot"`` or ``"lines"``.
      :param bool server: if ``True``, set ``server`` settings to matplotlib and do not show the graph.
      :param save_plot_path: a path to save the plot via using matplotlib function savefig.
  
      :returns: Object that contains the resulting scree plot (can be accessed like ``result.figure()``).
      """
      # check for matplotlib. exit if absent.
      plt = get_matplotlib_pyplot(server)
      if plt is None:
          return decorate_plot_result(figure=RAISE_ON_FIGURE_ACCESS)
      fig = plt.figure()
      variances = [
          s**2
          for s in self._model_json["output"]["importance"].cell_values[
              0
          ][1:]
      ]
      plt.xlabel("Components")
      plt.ylabel("Variances")
      plt.title("Scree Plot")
      plt.xticks(list(range(1, len(variances) + 1)))
  
      if type == "barplot":
          plt.bar(list(range(1, len(variances) + 1)), variances)
      elif type == "lines":
          plt.plot(list(range(1, len(variances) + 1)), variances, "b--")
  
      if save_plot_path is not None:
          plt.savefig(fname=save_plot_path)
      if not server:
          plt.show()
      return decorate_plot_result(figure=fig)
  
file_path: h2o-3/h2o-py/h2o/model/models/dim_reduction.py
imports: import h2o
  from h2o.model import ModelBase
  from h2o.plot import decorate_plot_result, get_matplotlib_pyplot, RAISE_ON_FIGURE_ACCESS
  from h2o.utils.compatibility import *
  from h2o.utils.shared_utils import can_use_pandas
label_desc: Use image node_id 8 for calling the H2ODimReductionModel obj's underlying member method code with example usage: obj.screeplot(type, server, save_plot_path) and returns: decorate_plot_result, decorate_plot_result