0

I have just discovered that there are tools that allow embedding images into terminals, like these ones.

I am wondering if there is a IPython (or, more generally jupyter console) builtin function that allows to do the same. That would be handy for displaying plots inline.

I know you could do that with QtConsole, but that is not really a terminal.

Barzi2001
  • 989
  • 8
  • 24

1 Answers1

0

Not directly in your console but in a new window:

import matplotlib.pyplot as plt
import matplotlib.image as mpimg

image = mpimg.imread('path/to/your/image.png')

# Display the image
plt.imshow(image)
plt.axis('off')  # remove the axis
plt.show()
Memristor
  • 599
  • 4
  • 11