1

I am trying to save plots generated by pyplot in mongodb. I could save them as files, then save the files as entries in the db, but is there a cleaner way of just saving the plot object and then retrieving and displaying it (from python code)?

4
  • Maybe you can store it in base64, as this SO question explains stackoverflow.com/questions/5314707/… Commented May 27, 2013 at 17:50
  • "Cleaner"? That's quite subjective. What's wrong with saving the files? Commented May 27, 2013 at 19:16
  • 1
    do you want to save this as pickled figure objects or as a png, pdf,.. ? Commented May 27, 2013 at 21:08
  • pickled figure would be preferable, but png is also an acceptable solution. Commented May 27, 2013 at 21:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.