# How to plot bar chart with grouped categorical x and uneven number of columns

**URL:** <https://community.plotly.com/t/how-to-plot-bar-chart-with-grouped-categorical-x-and-uneven-number-of-columns/93187>\
**Category:** 📊 Plotly Python\
**Tags:** question\
**Created:** [July 17, 2025, 3:57pm UTC](https://community.plotly.com/t/how-to-plot-bar-chart-with-grouped-categorical-x-and-uneven-number-of-columns/93187 "2025-07-17T15:57:43Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [July 25, 2025, 7:18am UTC](https://community.plotly.com/t/how-to-plot-bar-chart-with-grouped-categorical-x-and-uneven-number-of-columns/93187/5 "2025-07-25T07:18:53Z")

</div>

Hey @Madrigallo is that related?

> [@How do i get the bars lined up together?](https://community.plotly.com/t/how-do-i-get-the-bars-lined-up-together/79961):
>
> Hey Guys, I was making a grouped bar chart using plotly. I set the width of each bar to 0.2 and the gargap and bargroupgap as 0 but im still getting a lot of space between the bars of each group. I would like the charts in each category to be next to each other. Does any one know how to do it? in the attached photo, the blue and red bars should be next to each other. Thanks

I don´t really understand how your graph should look like.

---

_[View the full topic](https://community.plotly.com/t/how-to-plot-bar-chart-with-grouped-categorical-x-and-uneven-number-of-columns/93187)._
