class_docstr: A class of the initial plot object.
  
  Do not use this class explicitly.
  
  Instead, you should construct its objects with functions `ggplot()`,
  `corr_plot(...).points().build()` etc.
class_docstr_tok: ["A","class","of","the","initial","plot","object",".","Do","not","use","this","class","explicitly",".","Instead",",","you","should","construct","its","objects","with","functions","`","ggplot","(",")","`",",","`","corr_plot","(","...",")",".points","(",")",".build","(",")","`","etc","."]
docstr: Check if the `PlotSpec` object has at least one layer.
  
  Returns
  -------
  bool
      True if object has layers.
  
  Examples
  --------
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 4, 6
  
      from lets_plot import *
      LetsPlot.setup_html()
      p = ggplot()
      print(p.has_layers())
      p += geom_point(x=0, y=0)
      print(p.has_layers())
code: def has_layers(self) -> bool:
      """
      Check if the `PlotSpec` object has at least one layer.
  
      Returns
      -------
      bool
          True if object has layers.
  
      Examples
      --------
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 4, 6
  
          from lets_plot import *
          LetsPlot.setup_html()
          p = ggplot()
          print(p.has_layers())
          p += geom_point(x=0, y=0)
          print(p.has_layers())
  
      """
      return True if self.__layers else False
  
imports: import io
  import json
  import os
  from typing import Union
  from lets_plot._global_settings import get_global_bool, has_global_value, FRAGMENTS_ENABLED
label_desc: Use image node_id 4 for calling the PlotSpec obj's underlying member method code with example usage: obj.has_layers() and returns: unknown