class_docstr: Implementation of a surface figure obtained with `plotly` engine.
  
  Parameters
  ----------
  figure : Plotly figure instance or ``None``, optional
      Plotly figure instance to be used.
  
  output_file : :obj:`str` or ``None``, optional
      Output file path.
  
  Attributes
  ----------
  figure : Plotly figure instance
      Plotly figure. Use this attribute to access the underlying
      plotly figure for further customization and use plotly
      functionality.
  
  output_file : :obj:`str`
      Output file path.
docstr: Save the figure to file.
  
  Parameters
  ----------
  output_file : :obj:`str` or ``None``, optional
      Path to output file.
docstr_tok: ["Save","the","figure","to","file",".","Parameters","--","--","--","--","--","output_file",":",":","obj",":","`","str","`","or","``","None","``",",","optional","Path","to","output","file","."]
code: def savefig(self, output_file=None):
      """Save the figure to file.
  
      Parameters
      ----------
      output_file : :obj:`str` or ``None``, optional
          Path to output file.
      """
      if not is_kaleido_installed():
          raise ImportError(
              "`kaleido` is required to save plotly figures to disk."
          )
      self._check_output_file(output_file=output_file)
      if self.figure is not None:
          self.figure.write_image(self.output_file)
  
file_path: nilearn/nilearn/plotting/displays/_figures.py
imports: from nilearn._utils.helpers import is_kaleido_installed, is_plotly_installed
label_desc: Use image node_id 3 for calling the PlotlySurfaceFigure obj's underlying member method code with example usage: obj.savefig(output_file) without return types