title: Save a pivottablejs figure to file
body: <p>I have started using the package <code>pivottablejs</code> to manipulate and visualize pivot tables in python. </p>
  
  <pre><code>from pivottablejs import pivot_ui
  pivot_ui(df)  # where df is a pandas dataframe
  </code></pre>
  
  <p>will produce an interactive pivot table/plot in a jupyter notebook.</p>
  
  <p>Is there any pythonic way to save the figures produced by this package to (say) <code>png</code> from within the jupyter notebook? I am looking for something similar to the classic <code>plt.savefig('file.png')</code>. The front-end is essentially <code>javascript</code>, and I do not know how (or if it is possible) to access a javascript figure through python. </p>