How to Install Matplotlib on Linux? Last Updated : 29 Sep, 2022 Comments Improve Suggest changes Like Article Like Report Matplotlib is a low-level library of Python which is used for data visualization. It is easy to use and emulates MATLAB like graphs and visualization. This library is built on the top of NumPy arrays and consist of several plots like line chart, bar chart, histogram, etc. It provides a lot of flexibility but at the cost of writing more code. Environment Setup: Matplotlib is an overall package for creating static, animated, and interactive visualizations in Python. It literally opens up a whole new world of possibilities for you! Especially when it is used with Numpy or Pandas library, one can do unimaginable things. The plots give may give a new insight altogether. Now, the question arises i.e. How to make it running on your computer? But a more primary question would be, what are its pre-requisites or as we call it, dependencies for the software to run on your computer? Dependencies: Python (>= 3.6)FreeType (>= 2.3)libpng (>= 1.2)NumPy (>= 1.11)setuptoolscycler (>= 0.10.0)dateutil (>= 2.1)kiwisolver (>= 1.0.0)pyparsingInstallation on Linux: We will use the pip command to install this module. If you do not have pip installed then refer to the article, Download and install pip Latest Version. To install Matplotlib type the below command in the terminal: pip install matplotlib You will get the following message once the installation is complete: Let's see some examples of using matplotlib: Example 1: Creating Line plots Python3 # importing matplotlib module from matplotlib import pyplot as plt # x-axis values x = [5, 2, 9, 4, 7] # Y-axis values y = [10, 5, 8, 4, 2] # Function to plot plt.plot(x,y) # function to show the plot plt.show()   Output:   Example 2: Creating Bar plots  Python3 # importing matplotlib module from matplotlib import pyplot as plt # x-axis values x = [5, 2, 9, 4, 7] # Y-axis values y = [10, 5, 8, 4, 2] # Function to plot the bar plt.bar(x,y) # function to show the plot plt.show() Output: Example 3: Creating Scatter plots Python3 # importing matplotlib module from matplotlib import pyplot as plt # x-axis values x = [5, 2, 9, 4, 7] # Y-axis values y = [10, 5, 8, 4, 2] # Function to plot scatter plt.scatter(x, y) # function to show the plot plt.show() Output: Comment More infoAdvertise with us Next Article How to Install Matplotlib on Linux? D ddeevviissaavviittaa Follow Improve Article Tags : TechTips How To Installation Guide Blogathon Blogathon-2021 how-to-install +2 More Similar Reads How to Install Matplotlib on MacOS? In this article, we will learn how to install Matplotlib in Python on MacOS. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Installation:Method 1: Using pip to install Matplotlib Package Follow the below steps to install the Matplotlib 2 min read How to Install Numpy on Linux? Python NumPy is a general-purpose array processing package that provides tools for handling n-dimensional arrays. It provides various computing tools such as comprehensive mathematical functions, linear algebra routines. NumPy provides both the flexibility of Python and the speed of well-optimized c 2 min read How to Install NuPIC on Linux? NuPIC (short for "Numenta Platform for Intelligent Computing") is an open-source platform for machine learning and artificial intelligence. It was developed by Numenta, a company founded by Jeff Hawkins, the creator of the PalmPilot and the co-founder of Handspring. NuPIC is based on the theory of t 4 min read How to Install Matplotlib on python? Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. In this article, we will look into the various process of installing Matplotlib on Windo 2 min read How to Install Matplotlib on Anaconda? Matplotlib is a Python library for data visualization that allows users to create static, interactive, and animated plots. If you're using Anaconda, a leading platform for Python data science, installing Matplotlib is straightforward. This guide provides you with detailed instructions to install Mat 2 min read How to Install Python on Linux This guide explains how to install Python on Linux machines. Python has become an essential programming language for developers, data scientists, and system administrators. It's used for various applications, including web development, data science, automation, and machine learning.This comprehensiv 15+ min read How to Install Pillow on Linux? In this article, we will look into the various methods of installing the PIL package on a Linux machine. Python Imaging Library (expansion of PIL) is the de facto image processing package for Python language. It incorporates lightweight image processing tools that aid in editing, creating, and savin 2 min read How to Install Seaborn on Linux? Seaborn is a library mostly used for statistical plotting in Python. It is built on top of Matplotlib and provides beautiful default styles and color palettes to make statistical plots more attractive. Seaborn Dependencies: Seaborn has the following dependencies: Python 3.4+numpyscipypandasmatplotli 2 min read How to Install Pyproj on Linux? Pyproj is an Interface for the cartographic projections and coordinate transformations library (PROJ). In this article, we will look into the process of installing the Pyproj interface on a Linux machine. Pre-requisites: The only thing that you need for installing Numpy on Windows are: PythonPIP or 2 min read How to Install Python-pytaglib package on Linux? Pytaglib is a package in Python used for audio tagging. It is a cross-platformed library that works on Windows, Linux, and macOS. This package supports mp3, flac, ogg, etc file formats. It also supports arbitrary, non-standard tag names. So, in this article, we will be installing the Pytaglib packag 1 min read Like