Matplotlib - Anaconda Distribution



Matplotlib library is a widely-used plotting library in Python and it is commonly included in the Anaconda distribution.

What is Anaconda Distribution?

Anaconda is a distribution of Python and other open-source packages that aims to simplify the process of setting up a Python environment for data science, machine learning and scientific computing.

Anaconda distribution is available for installation at https://www.anaconda.com/download/. For installation on Windows, 32 and 64 bit binaries are available −

Anaconda3-5.1.0-Windows-x86.exe

Anaconda3-5.1.0-Windows-x86_64.exe

Installation is a fairly straightforward wizard based process. You can choose between adding Anaconda in PATH variable and registering Anaconda as your default Python.

For installation on Linux, download installers for 32 bit and 64 bit installers from the downloads page −

Anaconda3-5.1.0-Linux-x86.sh

Anaconda3-5.1.0-Linux-x86_64.sh

Now, run the following command from the Linux terminal −

Syntax

$ bash Anaconda3-5.0.1-Linux-x86_64.sh

Canopy and ActiveState are the most sought after choices for Windows, macOS and common Linux platforms. The Windows users can find an option in WinPython.

Here is how Matplotlib is typically associated with the Anaconda distribution:

Matplotlib in Anaconda

Pre-Installed

Matplotlib library is often included in the default installation of the Anaconda distribution. When we install Anaconda Matplotlib is available along with many other essential libraries for data visualization.

Integration with Jupyter

Anaconda comes with Jupyter Notebook which is a popular interactive computing environment. Matplotlib seamlessly integrates with Jupyter and makes our work easy to create and visualize plots within Jupyter Notebooks.

Anaconda Navigator

Anaconda Navigator is a graphical user interface that comes with the Anaconda distribution. This allows users to manage environments, install packages and launch applications. It provides an easy way to access and launch Jupyter Notebooks for Matplotlib plotting.

Conda Package Manager

Anaconda uses the 'conda' package manager which simplifies the installation, updating and managing of Python packages. We can use 'conda' to install or update Matplotlib within our Anaconda environment.

Verifying Matplotlib Installation

To verify whether Matplotlib is installed in our Anaconda environment we can use the following steps.

  • Open the Anaconda Navigator.

  • Navigate to the "Envinornments" tab.

Anaconda Apps
  • Look for "Matplotlib" in the list of installed packages. If it's there Matplotlib is installed.

Anaconda Navigator
  • Alternatively we can open Anaconda Prompt or a terminal and run the below mentioned code

Syntax

conda list matplotlib

This command will list the installed version of Matplotlib in our current Anaconda environment.

Output

Anaconda Prompt

Installing or Updating Matplotlib in Anaconda

If Matplotlib is not installed or we want to update it then we can use the following commands in the Anaconda Prompt or terminal.

To install Matplotlib

Syntax

conda install matplotlib
Conda Installation

As the matplotlib is already installed in the system it’s shown the message the All requested packages already installed.

To update Matplotlib

Syntax

conda update matplotlib
Update Conda

The above mentioned commands will manage the installation or update of Matplotlib and its dependencies in our Anaconda environment.

Finally we can say Matplotlib is a fundamental part of the Anaconda distribution making it convenient for users to create high-quality visualizations in their Python environments for data analysis and scientific computing.

Advertisements