question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to save image with plot_components?

See original GitHub issue

I am wondering if I can use plot_components and later save the figures to an image. I tried this

`plt = m.plot_components(forecast)

plt.savefig(‘output’)`

however plot_components returns a list and not a matplotlib figure. Hence the error was thrown…

Traceback (most recent call last): File "get_predictions.py", line 33, in <module> plt.savefig(output_file) AttributeError: 'list' object has no attribute 'savefig'

Any ideas is very much appreciated.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
guiledcommented, Mar 29, 2017

This is what I use and it works… m.plot_components(forecast).savefig('2.png');

0reactions
akmalsabricommented, Aug 18, 2020

how to save image into folder?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Save Plots To Image Files Using Matplotlib
In today's article we are going to showcase how to save matplotlib figures and plots into image files on your disk. Additionally, we...
Read more >
Save plot to image file instead of displaying it using Matplotlib
png , just call the matplotlib 's pylab class from Jupyter Notebook, plot the figure 'inline' jupyter cells, and then drag that figure/image...
Read more >
How to Save a Plot to a File Using Matplotlib? - GeeksforGeeks
Method 1: Save Plot as Image with Matplotlib using savefig(). The figure produced after data plotting is saved using the savefig() method, ...
Read more >
How to Save a Plot to a File Using Matplotlib | Tutorial by Chartio
Learn how to save a plot to a file using Matplotlib, a plotting library for Python. In this tutorial, we'll show you to...
Read more >
Save Plot as Image or Vector Graphics File - MathWorks
You can save plots as images or as vector graphics files using either the export button in the axes toolbar, or by calling...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found