4 MatPlotLib tricks I wish I knew earlier

Manpreet Singh
2 min readNov 16, 2021

Welcome back! MatPlotLib is an awesome graphing package with Python, if you’re new to this package, check out the link below to learn more about it:

So, let’s talk about some MatPlotLib tricks I wish I had known earlier!

Putting Labels On Graph

With MatPlotLib, you can actually label your graphs, to do this, we can use the title()/ylabel()/xlabel() functions, here is an example:

plot.title(‘Title of graph’)
plot.ylabel(‘label of y axis’)
plot.xlabel(‘label of x axis’)

Annotating Plots

Did you know that you can annotate your plots with MatPlotLib? Well, you actually can! There are 2 different functions that allow us to do this, these are the text()/annotate() functions! Here is there official website that goes into more detail about this:

--

--

Manpreet Singh
Manpreet Singh

No responses yet