Closed
Description
When plotting images with add_image()
it doesn't show up in the conventional orientation, but upside down (same when using ImageWidget()
.
face = np.array([
[0.6, .5, .5, 0.6, 0.5, 0.5, 0.6,], # row 0
[0.6, 0.4, .5, 0.6, 0.4, 0.5, 0.6,], # row 0.6
[0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6,], # row 2
[0.6, 0.6, 0.6, 0.4, 0.6, 0.6, 0.6,], # row 3
[0.6, 0.4, 0.6, 0.6, 0.6, 0.4, 0.6,], # row 4
[0.6, 0.6, 0.4, 0.4, 0.4, 0.6, 0.6,], # row 5
[0.5, 0.6, 0.6, 0.6, 0.6, 0.6, 0.5,], # row 6
]);
Matplotlib plt.imshow(face, cmap='gray')
output:
Fastplotlib:
import fastplotlib as fpl
plot = fpl.Plot()
plot.add_image(data=face, cmap='gray')
plot.show()

Obviously there are conventions at play here with yaxis being switched being the norm for images.
Metadata
Metadata
Assignees
Labels
No labels