您的位置:首页 > 编程语言 > PHP开发

matplotlib之pyplot中ylabel和xlabel方法详解

2016-11-21 22:05 519 查看
去官网查看了一下方法,发现参数给了默认值,但是其他的值是什么?一脸懵逼。。。。。。。。竟然不给出一个参数所有的设置值,首先贴出官方实例

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'
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  matplotlib