title: saving a sankey to a file from jupyter
body: <p>I have a loop where I want to render some sankeys to .png files.</p>
  <p>Checking some docs here:
  <a href="https://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Exporting%20Images.ipynb" rel="nofollow noreferrer">https://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Exporting%20Images.ipynb</a></p>
  <p>I would expect <code>sankey.save_svg('test.svg')</code> to work.</p>
  <p>From reading those docs, there's a caveat that trying to display and then save won't work, but I'm not trying to display, I just want to save a list of images. However I'm getting the same <code>warnings.warn('No png image available! Try auto_save_png() instead?')</code> error and cannot save.</p>
  <p>If I run one line at a time, and return the sankey and let it display in the normal run of a python notebook, things work ok... So it seems there's something that happens when you let the notebook display a sankey that isn't happening when I'm just trying in a loop to render them to files.</p>
  <pre class="lang-py prettyprint-override"><code>from ipywidgets import Layout
  from ipysankeywidget import SankeyWidget
  
  def draw_one(use_case, limit=50):
      df = Cli.query_paths(use_case=use_case, limit=limit)
  
      layout = Layout(width=&quot;2000&quot;, height=&quot;500&quot;)
      fpath = f'./data/ignored/images/{use_case}-{limit}.png'
  
      # with or without: .auto_save_png(fpath)
      sankey = SankeyWidget(links=df.to_dict('records'), layout=layout) 
      sankey.save_png(fpath)
  
  cases = [
  'INTL',
  'PAC',
  ]
  
  def loop():
      for use_case in cases:
          print('sk:', use_case)
          sk = draw_one(use_case, limit=50)
  
  loop()
  </code></pre>