New Tutorials:   TKINTER    KOTLIN    JAVASCRIPT    SASS/SCSS    PL/SQL    Matplotlib    C++ Programs
See the Tutorial List

Matplotlib in Jupyter Notebook

In this tutorial, we will cover an introduction to the Jupyter Notebook in which we will create visualizations using Matplotlib module and we will also cover the main features of Jupyter Notebook.

Jupyter Notebook is an open-source web application with the help of which one can create and share documents containing live python code, visualizations, and code explanation.

  • Jupyter Notebook is used for data cleaning, data visualization, machine learning, numerical simulation, and many more such use cases.

  • Jupyter mainly stands for Julia, Python, and Ruby and also initially Jupyter Notebook was developed for these three but later on, it started supporting many other languages.

  • Ipython was developed in 2001 by Fernando Perez as a command shell used for interactive computing in multiple programming languages starting with Python. Then in 2014, a spin-off project was announced by Fernando Perez which was known as Project Jupyter.

  • nd as we know today, IPython continue to exist as a Python shell and a kernel for Jupyter, while the notebook and other language parts of IPython shifted under the Jupyter name.

  • Jupyter also added additional support for Julia, R, and Ruby.

Features of Jupyter(IPython) Notebook

Let us discuss the features of Jupyter Notebook after that we will discuss how to launch it and use it with Matplotlib library:

  • Jupyter Notebook is a tool that is very flexible and very helpful in sharing code with complete explanation, comments, images, etc. together, which is very helpful if you are learning to code.

  • It is important to note that the Jupyter Notebook runs via a web browser, and the notebook itself could be hosted on your local machine or on a remote server.

  • With the help of the Jupyter Notebook, it becomes easy to view code, execute the code, and display the results directly in your web browser.

  • With the help of the Jupyter Notebook, you can share your code with others. It allows interactive changes to the shared code and data set.

  • Suppose there is a piece of code and you want to explain it's working line-by-line, with live feedback, you could embed the code simply in a Jupyter Notebook. The best thing is the code will remain fully functional and you can add interactivity along with the explanation, showing and telling at the same time which is beneficial.

Let us start with the Jupyter notebook. Firstly you need to open Anaconda navigator (that is a desktop graphical user interface included in Anaconda allowing you to launch applications and easily manage the Conda packages, environments, and channels without using command-line commands).

Now search Ananconda Navigator on your machine(you should install it in advance if you want to use Jupyter Notebook - https://docs.anaconda.com/anaconda/navigator/install/):

Matplotlib in Jupyter notebook

After opening the Anaconda Navigator you will see the installed components in its distribution. Let us show you:

Matplotlib in Jupyter notebook

Now from here you just need to launch the Jupyter Notebook to start working with Matpotlib. Just click on the launch and it will launch the Jupyter Notebook.

As we have mentioned in the above points that Jupyter Notebook runs via a Web Server.

After launching you will see this:

Matplotlib in Jupyter notebook

if you want to start by making a new notebook where you can perform your task easily, you can easily do this just by clicking on the "New button" in the "Files tab".

There you will see many options like a terminal, to make a regular text file, to make a folder, last but not least you will also see the option to make a Python 3 notebook. Let us show you a pictorial representation for your clear understanding:

Matplotlib in Jupyter notebook

Summary:

In this tutorial we learned how to install Jupyter Notebook, how to use it and other details about Jupyter notebook. We are covering about the Jupyter notebook because we will be using it with the Matplotlib module for plotting and visualizations.