[Feature Request] Save resulting grid of images
Is it possible to save the result of ipyplot.plot_images( ) via python code? If not, I think that would be a useful feature to have.
Hi @marianatuma
Currently there's no easy way to do it. You can export HTML that created the plot but that's it.
I did some research in that area and to convert HTML to images in python I would need to rely on something like imgkit which depends on some external tools as well. I will think about it and run some experiments
Similar/duplicate issue #14 but let's keep the thread going here since it went a bit in a different direction there
Is it possible to save the result of
ipyplot.plot_images( )via python code? If not, I think that would be a useful feature to have.
I've managed to save the generated HTML like this. As per saving the output directly to an image, this might be helpful https://gist.github.com/aspose-com-gists/2741bb268101fd3e5ec74a860abf717b
- In ipyplot __plotting.py
# ipyplot.__plotting
def plot_images(...)
...
html = _create_imgs_grid(...)
return html
- html = ipyplot.plot_images(...)
html = ipyplot.plot_images(...)
with open('view.html', 'w') as fin:
fin.write(html)