How to save Plotly Offline graph in format png?
<p>I am using Plotly offline to generate graph in python.</p>

<p>As per the documentation below, </p>

<p><a href="https://plot.ly/python/offline/" rel="noreferrer">https://plot.ly/python/offline/</a></p>

<p>Here is my code, which perfectly generates C:/tmp/test_plot.html file.</p>

<pre><code>import plotly.offline as offline

offline.init_notebook_mode()

offline.plot({'data': [{'y': [4, 2, 3, 4]}], 
               'layout': {'title': 'Test Plot', 
                          'font': dict(family='Comic Sans MS', size=16)}},
             auto_open=False, filename='C:/tmp/test_plot')
</code></pre>

<p>How can I save this graph as png instead of html?</p>