- 积分
- 67387
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-7-23
- 最后登录
- 1970-1-1
|
发表于 2021-8-4 16:17:34
|
显示全部楼层
本帖最后由 edwardli 于 2021-8-4 16:23 编辑
还是我来吧,上午刚刚重写了第7.8节 ,巧的难以置信,但是改动的不是这个
boxplot里面有个不起眼的keyword:positions,位置,官方文档如下
positions:array-like, optional
The positions of the boxes. The ticks and limits are automatically set to match the positions.
Defaults to range(1, N+1) where N is the number of boxes to be drawn.
你可以只绘制一个boxplot(vars)就知道了,出来的坐标是从1开始到len(ens)+1的。
所以,要么再boxplot中传递进positions=range(……)当然np.arange也可。
要么就在后面的ax.plot中,传递“从1开始到len(ens)+1”,例如ax.plot( range(1,len(ens)+1) ,ens[0, :] ……)
|
|