Instagram
youtube
Facebook
Twitter

Introduction

Data Visualization with Matplotlib

  • Welcome to this tutorial, here we are going to get familiar with python's most well-known module for graphing. 
  • We'll look at how to use Matplotlib to make visually attractive graphs and charts that present data in interesting and educational ways.
  • By the end of this section, you'll know how to create and personalize line graphs, bar charts, pie charts, and histograms

About Matplotlib

  • Matplotlib is a python library that is used as a visualization advantage.
  • It was created by John D. Hunter.
  • It is open source and is mostly written in python. However, a few parts of it were written in C, Obj-C, and Javascript.

Installation of Matplotlib

  • The installation is very easy when you have python and pip already installed on your system using this command:
    C:\Users\Your Name>pip install matplotlib

    You can also use Anaconda, Spyder which already comes with Matplotlib.


Importing of Matplotlib

  • After installation, it's time to import the Matplotlib library in your python code have some visualization and get some insights.
  • Use the import keyword for this:
    import matplotlib
  • You can also check the version of matplotlib using __version__ attribute:
    import matplotlib
    
    print(matplotlib.__version__)