class_docstr: An immutable object representation of a visualization.
  
  Notes
  -----
  - A plot object is returned via the SFrame's or SArray's .plot() method
  
  Examples
  --------
  Suppose 'plt' is an Plot Object
  
  We can view it using:
  
  >>> plt.show()
  
  We can save it using:
  
  >>> plt.save('vega_spec.json')
  
  We can also save the vega representation of the plot without data:
  
  >>> plt.save('vega_spec.json', False)
class_docstr_tok: ["An","immutable","object","representation","of","a","visualization",".","Notes","--","--","-","-","A","plot","object","is","returned","via","the","SFrame","'s","or","SArray","'s",".plot","(",")","method","Examples","--","--","--","--","Suppose","'plt","'","is","an","Plot","Object","We","can","view","it","using",":",">",">",">","plt.show","(",")","We","can","save","it","using",":",">",">",">","plt.save","(","'vega_spec.json","'",")","We","can","also","save","the","vega","representation","of","the","plot","without","data",":",">",">",">","plt.save","(","'vega_spec.json","'",",","False",")"]
code: def _repr_javascript_(self):
      from IPython.core.display import display, HTML
  
      self.materialize()
      vega_spec = self.get_vega(True)
  
      vega_html = (
          '<html lang="en"> \
                          <head> \
                              <script src="https://cdnjs.cloudflare.com/ajax/libs/vega/5.4.0/vega.js"></script> \
                              <script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/4.0.0/vega-embed.js"></script> \
                              <script src="https://cdnjs.cloudflare.com/ajax/libs/vega-tooltip/0.5.1/vega-tooltip.min.js"></script> \
                              <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vega-tooltip/0.5.1/vega-tooltip.min.css"> \
                              <style> \
                              .vega-actions > a{ \
                                  color:white; \
                                  text-decoration: none; \
                                  font-family: "Arial"; \
                                  cursor:pointer; \
                                  padding:5px; \
                                  background:#AAAAAA; \
                                  border-radius:4px; \
                                  padding-left:10px; \
                                  padding-right:10px; \
                                  margin-right:5px; \
                              } \
                              .vega-actions{ \
                                  margin-top:20px; \
                                  text-align:center \
                              }\
                              .vega-actions > a{ \
                                  background:#999999;\
                              } \
                              </style> \
                          </head> \
                          <body> \
                              <div id="vis"> \
                              </div> \
                              <script> \
                                  var vega_json = '
          + _json.dumps(_json.dumps(vega_spec))
          .replace("&", "&amp;")
          .replace("'", "&apos;")
          + '; \
                                  var vega_json_parsed = JSON.parse(vega_json); \
                                  var toolTipOpts = { \
                                      showAllFields: true \
                                  }; \
                                  if(vega_json_parsed["metadata"] != null){ \
                                      if(vega_json_parsed["metadata"]["bubbleOpts"] != null){ \
                                          toolTipOpts = vega_json_parsed["metadata"]["bubbleOpts"]; \
                                      }; \
                                  }; \
                                  vegaEmbed("#vis", vega_json_parsed).then(function (result) { \
                                      vegaTooltip.vega(result.view, toolTipOpts);  \
                                  }); \
                              </script> \
                          </body> \
                      </html>'
      )
  
      display(
          HTML(
              '<html> \
                  <body> \
                      <iframe style="border:0;margin:0" width="'
              + str(
                  (vega_spec["width"] if "width" in vega_spec else 600)
                  + 200
              )
              + '" height="'
              + str(vega_spec["height"] + 220)
              + '" srcdoc='
              + "'"
              + vega_html
              + "'"
              + ' src="demo_iframe_srcdoc.htm"> \
                          <p>Your browser does not support iframes.</p> \
                      </iframe> \
                  </body> \
              </html>'
          )
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import json
  import os
  import sys
  from tempfile import mkstemp
  from subprocess import Popen
  from subprocess import PIPE
label_desc: Use image node_id 8 for calling the Plot obj's underlying member method code with example usage: obj._repr_javascript_() without return types