Loading an image

Most popular image formats, such as .viz.jpg, .png, .gif, and so on, can be loaded into Jupyter Notebooks to better illustrate reports. A .gif can even be loaded and shown as an animation.

These image files need to be kept in the current working directory. The current working directory can be found by running os.getcwd( ) in a code block in the notebook. Images to be loaded should be kept in this directory. The working directory can be changed by using os.chdir (the directory path). Note that these commands assume that import os has already been run. The following code is used to show a .jpg image, as well as its output:

LaTex snippet and output .jpg image

The following code is used to show a .gif image, as well as its output:

LaTex snippet and output .gif image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset