Skip to content

Instantly share code, notes, and snippets.

@P8H
Last active April 4, 2022 06:12
Show Gist options
  • Save P8H/222d6deef0f780156364319652633dc6 to your computer and use it in GitHub Desktop.
Save P8H/222d6deef0f780156364319652633dc6 to your computer and use it in GitHub Desktop.
Display two Images or SVGs side by side in a Jupyter/Colab Notebook
from IPython.display import HTML
style = "<style>#output-body{display:flex; flex-direction: row;}</style>"
display(HTML(style))
display(SVG('level_0_eval/cg.svg'))
display(SVG('level_0_eval/cg.svg'))
@briverse17
Copy link

Thank you!

This can be extended to more than two Images.

@ogencoglu
Copy link

Do you have a similar trick for displaying two locally saved HTML objects side by side?

@P8H
Copy link
Author

P8H commented Apr 4, 2022

Do you have a similar trick for displaying two locally saved HTML objects side by side?

Nope, but I am also not an jupyter expert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment