matplotlib之pyplot中ylabel和xlabel方法详解

去官网查看了一下方法,竟然没有给出一个参数所有的设置值,首先贴出官方实例
Set the y axis label of the current axis.

matplotlib.pyplot.ylabel(s, *args, **kwargs)

override = {
   'fontsize'            : 'small',
   'verticalalignment'   : 'center',
   'horizontalalignment' : 'right',
   'rotation'='vertical' : }

后来获取的value值
fontsize:可以给一个数字
verticalalignment:’top’, ‘bottom’, ‘center’, ‘baseline’
horizontalalignment:’center’, ‘right’, ‘left’
rotation: ‘vertical’,’horizontal’,’vertical’

同理 对于xlabel
Set the x axis label of the current axis.

matplotlib.pyplot.xlabel(s, *args, **kwargs)

override = {
    'fontsize'            : 'small',
    'verticalalignment'   : 'top',
    'horizontalalignment' : 'center'
    }

你可能感兴趣的:(python)