Simple Image#

Example showing the simple plot creation with Standard imageio image.

image simple
Imageio: 'camera.png' was not found on your computer; downloading it now.
Try 1. Download from https://github.com/imageio/imageio-binaries/raw/master/images/camera.png (136 kB)
Downloading: 8192/139512 bytes (5.9%)139512/139512 bytes (100.0%)
  Done
File saved as /home/runner/.imageio/images/camera.png.

# test_example = true

import fastplotlib as fpl
import imageio.v3 as iio

figure = fpl.Figure(size=(700, 560))

data = iio.imread("imageio:camera.png")

# plot the image data
image_graphic = figure[0, 0].add_image(data=data, name="iio camera")

figure.show()


# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively
# please see our docs for using fastplotlib interactively in ipython and jupyter
if __name__ == "__main__":
    print(__doc__)
    fpl.run()

Total running time of the script: (0 minutes 4.679 seconds)

Gallery generated by Sphinx-Gallery