We want to show in this recipe how to solve a "real-world" task—how to use matplotlib to visualize our directory occupancy.
In this recipe we will learn how to visualize a filesystem tree with relative sizes.
We all have big hard drives that sometimes contain stuff that we usually forget about. It would be nice to see what is inside such a directory, and what the biggest file inside is.
Although there are many more sophisticated and elaborate software products for this job, we want to demonstrate how this is achievable using Python and matplotlib.
Let's perform the following steps: