Google Colab - How to Use Matplotlib in Google Colab

avatar

In this post, we are going to see How to Use Matplotlib in Google Colab. Matplotlib is one of the popular library for visualization. You can design charts, graphs and other visualization required for your program.

Previously I covered few basics in the Google Colab Tutorial. I also covered how to use Numpy in Google Colab. So if you have not followed it yet, you can consider going through those links and consider learning some of those basics.

Google colab is free to use Jupyter notebook ecosystem which allows you to use various python libraries from the Google Cloud. You can also use the google colab for the various CPU, GPU intensive computation tasks using this cloud tool.

I have created a video to give you an overview on how to use the Google Colab and Matplotlib Library for the data science work. You should give this one a try.


Open Google Colab


Let's first start by opening the Google Colab and then consider finding this particular library. Most of the python libraries specific to the data science are easy to use here and also you can specifically use a version if you want as well. When you open the Google colab it should look something like this.

co.jpg

Use Matplotlib


Next thing you would be doing is making sure you are going to be installing the matplotlib library. You can check out the commands below for installing the library.

!pip install matplotlib

Once you set up the library you can easily start building the small programs and for which you can check the above video or you can even try out the below code for the graph.

matplotlib.png

Types of Charts/Graphs for Matplotlib


You can do the various types of the graphs in the matplotlib. You can make the basic graph which is bar graph. Then you can add the lines. You can also add the grid into the chart. Some of the time that sort of the addition always helps.

This is not the only library that is out there for the graphs and the charts. You can make use of the libraries like bokeh and few other visualization libraries. These type always helps out based on the deployment target and the matplotlib library is a good to start with.

What are some of the other type of the libraries you would like to learn? What are some of the language based packages you want to explore? I personally feel the R language Studio would be a good for starters so that is a good to start with in the process.

I feel that apart from Python, I also need to cover the R language. I think the R language and it's some of the datasets are good to explore. I am going to find the datasets and also various libraries you would be exploring for analytics and other visualization.

If you happen to like this content, do give me feedback over there and that would help me improve my efforts in near future.



0
0
0.000
4 comments
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

0
0
0.000