绘制:多轴分组条形图

编程入门 行业动态 更新时间:2024-10-28 03:32:05
本文介绍了绘制:多轴分组条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我在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.

更多推荐

绘制:多轴分组条形图

本文发布于:2023-07-18 00:45:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1139220.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条形图

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!