0

I intend to plot 3 figures in one jpeg or png file by enumerating a list. How do I save the plots of the list of existing figure numbers obtained using a code similar to one shown here: Get the list of figures in matplotlib, and below. The link shows how to save each figure separately but not saving as one image from the list of figure numbers.

import matplotlib.pyplot as plt
fig = list(map(plt.figure, plt.get_fignums()))

My wish is to get the 3 plots represented in the list of figure numbers as one jpeg file

Starter
  • 417
  • 4
  • 12
  • That's not possibly with matplotlib. But you can of course create 3 separate jpg files and then use a some imaging tool, e.g. pillow, to [concatenate those into a single jpg](https://stackoverflow.com/questions/30227466/combine-several-images-horizontally-with-python)). – ImportanceOfBeingErnest Jul 12 '19 at 12:14
  • Okay thanks. I just looked here https://automatetheboringstuff.com/chapter17/. so you think the cat command of pillow will work for my use case. – Starter Jul 12 '19 at 12:22

0 Answers0