问题
I want to display two images, that I have them saved locally, in one single makedown cell side-by-side? I found previous post but it uses HTML()
not Image()
method.
The way I tried was:
from IPython.core.display import Image, display
display(Image('/whateverfile/counts1.png',width=100,height=100), Image('/whateverfile/counts2',width=100, height=100))
But that did not work.
Any ideas how to solve this?
Thanks
回答1:
from IPython.display import HTML, display
display(HTML("<table><tr><td><img src='/image/counts1.png'></td><td><img src='/image/counts2'></td></tr></table>"))
Set other parameters as you like.
Or maybe using nbextensions and splitting the cell in two (having 2 outputs side by side) would fit your needs?
来源:https://stackoverflow.com/questions/47637739/how-to-display-two-local-images-side-by-side-in-jupyter