Plotly: Grouped Bar Chart with multiple axes

2019-04-23 08:56发布

问题:

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:

  • With single Y axis grouped bar chart is shown here.
  • Multiple axes is also explained here and reference for y-axis is available here

回答1:

Here's an example of a grouped bar charts with multiple axes: https://plot.ly/~etpinard/2080/grouped-bars-on-multiple-axes/

The corresponding python code can be found here: https://plot.ly/~etpinard/2080/grouped-bars-on-multiple-axes.py

Hopefully this helps.