# Grouped bar chart issue

**URL:** <https://community.plotly.com/t/grouped-bar-chart-issue/6704>\
**Category:** 📊 Plotly Python\
**Created:** [November 7, 2017, 7:33pm UTC](https://community.plotly.com/t/grouped-bar-chart-issue/6704 "2017-11-07T19:33:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://community.plotly.com/u/Dan)\
**Post date:** [November 7, 2017, 7:33pm UTC](https://community.plotly.com/t/grouped-bar-chart-issue/6704/1 "2017-11-07T19:33:40Z")

</div>

I try to plot a grouped bar chart, by using python and the javascript lib plotly. My code looks like this:

```
import plotly.graph_objs as go
import plotly

traces = []

y = [[0, 2, 4, 6], [1, 3, 5, 7]]

for single_y in y:
    traces.append(go.Bar(
        x=['giraffes', 'orangutans'],
        y=single_y
    ))

layout = go.Layout(
    barmode='group'
)

fig = go.Figure(data=traces, layout=layout)

plotly.offline.plot(fig)

```

However, the result is not as expected. Because the y list of lists contains 4 values and therefore I would expected that all 4 values are mapped to the two x columns automatically.

What am I doing wrong here?
