# Order issue in groupedboxplot (StatsPlot.jl)

**URL:** https://discourse.julialang.org/t/order-issue-in-groupedboxplot-statsplot-jl/102789
**Category:** New to Julia
**Created:** [August 14, 2023, 12:05pm UTC](https://discourse.julialang.org/t/order-issue-in-groupedboxplot-statsplot-jl/102789 "2023-08-14T12:05:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sahil\_Khan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sahil_khan/32/47573_2.png) [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)
#### Post date: [August 14, 2023, 12:05pm UTC](https://discourse.julialang.org/t/order-issue-in-groupedboxplot-statsplot-jl/102789/1 "2023-08-14T12:05:12Z")

</div>

I’m using groupedboxplot to plot boxplot for my data but while doing so I see that order in legend and in plot itself is not correct. It should be P\_9, P\_10, P\_11 P\_12, P\_13 while I get.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/d/ed460d7fc3ca5f9f05ac3d080872ce3d78a0bdba.png)

How can I change this ? and plot in above mentioned order? my data is in correct order.

Thank you

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [August 14, 2023, 9:36pm UTC](https://discourse.julialang.org/t/order-issue-in-groupedboxplot-statsplot-jl/102789/2 "2023-08-14T21:36:05Z")

</div>

Same issue as here

> [@Groupedbar plotting not as expected](https://discourse.julialang.org/t/groupedbar-plotting-not-as-expected/95545):
>
> I have no idea why N=8 is going to the far right and isn’t on the far left. Please let me know if anyone knows what’s happening here
