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","."]
code: def as_dict(self):
      d = super().as_dict()
      d["kind"] = self.kind
      d["scales"] = [scale.as_dict() for scale in self.__scales]
      d["layers"] = [layer.as_dict() for layer in self.__layers]
      d["metainfo_list"] = [
          metainfo.as_dict() for metainfo in self.__metainfo_list
      ]
      return d
  
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 6 for calling the PlotSpec obj's underlying member method code with example usage: obj.as_dict() and returns: d