matplotlib.pyplot.ylabel()函数
matplotlib.pyplot.ylabel()
这个函数为图形的y轴设置标签。
语法:matplotlib.pyplot.ylabel(ylabel, fontdict=None,labelpad=None)
参数:
ylabel:标签的名称
fontdict:为标签添加字体样式
labelpad:这有助于我们设置标签和轴之间的间距
示例1
输出:
示例2
输出:
示例# 3:
Output:
matplotlib.pyplot.ylabel()
这个函数为图形的y轴设置标签。
语法:matplotlib.pyplot.ylabel(ylabel, fontdict=None,labelpad=None)
参数:
ylabel:标签的名称
fontdict:为标签添加字体样式
labelpad:这有助于我们设置标签和轴之间的间距
输出:
输出:
示例# 3:
Output: