gpt4 book ai didi

python-2.7 - Python 条形图中 error_kw 的关键字值

转载 作者:行者123 更新时间:2023-12-04 15:34:33 25 4
gpt4 key购买 nike

我想调整条形图中的误差条属性。显然这是通过使用关键字参数(即在 error_kw 中)来完成的。例如

from pylab import *

fig = figure()
ax = fig.add_subplot(111)

ax.plot( left=0, width=1, height=5, error_kw=dict(elinewidth=3, ecolor='b') )

但是,我找不到可能的 error_kw 值的列表。
我提前为问这样一个微不足道的问题道歉,但我在任何地方都找不到这个问题,这让我发疯。

最佳答案

查看 matplotlib.pyplot.bar 的参数

Parameters: 
left : sequence of scalars

the x coordinates of the left sides of the bars

height : sequence of scalars

the heights of the bars

width : scalar or array-like, optional, default: 0.8

the width(s) of the bars

bottom : scalar or array-like, optional, default: None

the y coordinate(s) of the bars

color : scalar or array-like, optional

the colors of the bar faces

edgecolor : scalar or array-like, optional

the colors of the bar edges

linewidth : scalar or array-like, optional, default: None

width of bar edge(s). If None, use default linewidth; If 0, don’t draw edges.

xerr : scalar or array-like, optional, default: None

if not None, will be used to generate errorbar(s) on the bar chart

yerr :scalar or array-like, optional, default: None :

if not None, will be used to generate errorbar(s) on the bar chart

ecolor : scalar or array-like, optional, default: None

specifies the color of errorbar(s)

capsize : integer, optional, default: 3

determines the length in points of the error bar caps

error_kw : :

dictionary of kwargs to be passed to errorbar method. ecolor and capsize may be specified here rather than as independent kwargs.

align : [‘edge’ | ‘center’], optional, default: ‘edge’

If edge, aligns bars by their left edges (for vertical bars) and by their bottom edges (for horizontal bars). If center, interpret the left argument as the coordinates of the centers of the bars.

orientation : ‘vertical’ | ‘horizontal’, optional, default: ‘vertical’

The orientation of the bars.

log : boolean, optional, default: False

If true, sets the axis to be log scale

关于python-2.7 - Python 条形图中 error_kw 的关键字值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21318080/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com