I'm trying to render an image at its true dimensions (not scaled or stretched) and the easiest way to do this with matplotlib seems to be figimage
.
However, when I try to use it in a Jupyter notebook, the figure doesn't show. Other plots show fine, this only seems to affect figimage
:
As you can see, this first plot shows fine, but the second one does not. What am I doing wrong?
When I run the following code in an IPython shell , the figure shows up as expected, so maybe it's a problem with my Jupyter setup?
import matplotlib
from matplotlib import pyplot as plt
import numpy as np
x = np.linspace(0, 2*np.pi, 500)
plt.plot(x, np.sin(x))
plt.show()
data = np.random.random((500,500))
plt.figimage(data)
plt.show()