# Order of groupedbar

**URL:** <https://discourse.julialang.org/t/order-of-groupedbar/64749>\
**Category:** Visualization\
**Tags:** statsplots\
**Created:** [July 16, 2021, 1:37pm UTC](https://discourse.julialang.org/t/order-of-groupedbar/64749 "2021-07-16T13:37:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [July 16, 2021, 1:37pm UTC](https://discourse.julialang.org/t/order-of-groupedbar/64749/1 "2021-07-16T13:37:27Z")

</div>

I have the following plot of a Likert scale:

```julia
StatsPlots.groupedbar(
    repeat(questions, outer = 5), 
    weights, 
    group=repeat(["1", "2", "3", "4", "5"], inner=length(questions)), 
    bar_position=:stack, 
    orientation=:h, 
    xticks=(0:0.25:1, ["$i %" for i in 0:25:100]),
)

```

where I have three questions and the normalized responses are in the matrix `weights`.

 ![OA_likert - Kopie](https://global.discourse-cdn.com/julialang/original/3X/8/3/838329ad716a076ec8c08acbfbaf515d8da7f13f.png)

Is it possible to reverse the ordering of the groups?  
It seems that they are sorted.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [July 16, 2021, 7:32pm UTC](https://discourse.julialang.org/t/order-of-groupedbar/64749/2 "2021-07-16T19:32:10Z")

</div>

You may check [this post](https://discourse.julialang.org/t/statplots-groupedbar-order-x-axis/13912/18) out.
