course content

Course Content

Visualization in Python with matplotlib

Making Chart InformativeMaking Chart Informative

Let's improve the last chart with some information!

To improve the 'readability' of this plot, we can set the labels on the axis, set the title for the chart, and add a label to the colormap legend. All the things but the last one can be done within the .set function applied to the Axes object. Within the .set() function we can pass xlabel, ylabel and title to set labels for the x-axis, y-axis, and title for an entire plot respectively. To add the title for colormap legend, we first need to assign .colorbar() to some variable. Then, we need to call Axes object (usually ax) and call .set_xlabel() (or .set_ylabel() for vertical text) function passing the required label as an argument.

Everything was clear?

Section 3. Chapter 11