You are reading an old version of the documentation (v3.1.3). For the latest version see https://matplotlib.org/stable/
Version 3.1.3
matplotlib
Fork me on GitHub

matplotlib.axis.YAxis.set_label

YAxis.set_label(self, s)

Set a label that will be displayed in the legend.

Parameters:
s : object

s will be converted to a string by calling str.