本文介绍了绘制:多轴分组条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在trace2 = Bar(...,yaxis='y2')的Layout中设置barmode='group'时,这会导致钢筋堆叠或覆盖而不是分组.如何在具有多个轴的同时对这些条进行分组?
When I set barmode='group' in Layout while trace2 = Bar(...,yaxis='y2'), this leads bars to be stacked or overlayed instead of grouping them. How can I group the bars while having multiple axes?
我检查了这些但无济于事:
I went over these but no avail:
- 在单个Y轴上分组的条形图显示在此处.
- 还解释了多轴此处,并且提供了y轴参考此处
- With single Y axis grouped bar chart is shown here.
- Multiple axes is also explained here and reference for y-axis is available here
对于现在遇到这篇文章的人来说,plotly现在在条形图中具有offsetgroup属性,可以解决此问题.设置barmode='grouped'仍然无效.
For those coming across this post now, plotly now has a offsetgroup attribute in bar graphs that solves this issue. Setting barmode='grouped' still does not work.
更多推荐
绘制:多轴分组条形图
发布评论