offline.plot has the attributes image='png and image_filename='image_file_name' to save the file as png .
offline.plot({'data': [{'y': [4, 2, 3, 4]}], 'layout': {'title': 'Test Plot', 'font': dict(family='Comic Sans MS', size=16)}}, auto_open=True, image = 'png', image_filename='plot_image', output_type='file', image_width=800, image_height=600, filename='temp-plot.html', validate=False)
See plotly or online plotly .
However, one caveat is that since the output image is HTML bound, it will open in your browser and ask for permission to save the image file. You can disable this in your browser settings.

On the other hand, you might want to take a look at the matplotlib graphic transform using plot_mpl .
The next example is offline.py
from plotly.offline import init_notebook_mode, plot_mpl import matplotlib.pyplot as plt init_notebook_mode() fig = plt.figure() x = [10, 15, 20, 25, 30] y = [100, 250, 200, 150, 300] plt.plot(x, y, "o") plot_mpl(fig)