Stop Creating Boring Vanilla Plots — Use Matplotlib Annotations Instead

<p>Every single tutorial or course I took did not care to spend more than 5 minutes explaining annotations in Matplotlib. If I googled the topic, the first 5&ndash;6 links are from Matplotlib documentation; the rest are just slightly altered versions of it.</p> <p>I found this frustrating because I was not a big fan of Matplotlib docs (until they changed it last year). So, for my future self and others, I decided to write a comprehensive tutorial on controlling annotations in Matplotlib.</p> <h2>Setup</h2> <p>&nbsp;</p> <p>We will be using two datasets downloaded from Kaggle and one preloaded dataset from Seaborn. The first one is the&nbsp;Nobel Prize&nbsp;winners&rsquo; data from 1901 to 2016, and the&nbsp;stocks&nbsp;dataset contains stock prices for about 500 companies.</p> <p>&nbsp;</p> <p>For the rest of the article, it helps if you know how to work with the OOP interface of Matplotlib. If you don&rsquo;t, here is a helpful article</p> <p><a href="https://pub.towardsai.net/stop-creating-boring-vanilla-plots-use-matplotlib-annotations-instead-b0ecf5a0ddf4">Visit Now</a></p>