# How to change x label when boxplotting different dataframes

**URL:** https://discourse.julialang.org/t/how-to-change-x-label-when-boxplotting-different-dataframes/53542
**Category:** General Usage
**Tags:** plotting
**Created:** [January 18, 2021, 2:02pm UTC](https://discourse.julialang.org/t/how-to-change-x-label-when-boxplotting-different-dataframes/53542 "2021-01-18T14:02:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)
#### Post date: [January 18, 2021, 2:02pm UTC](https://discourse.julialang.org/t/how-to-change-x-label-when-boxplotting-different-dataframes/53542/1 "2021-01-18T14:02:30Z")

</div>

Hello, using Julia 1.5 on Atom, I want to make a boxplot comparing values from different dataframes. It is almost how I want it, but the x label needs to be fixed and I can’t figure it out. I used [the series plot recipe](http://docs.juliaplots.org/latest/tutorial/#Using-Series-Recipes), but I think it doesn’t work as I expect because the data are from different dataframes.

```julia
using DataFrames, StatsPlots
df1 = rand(5, 5)
df2= rand(5, 5)
df3 = rand(5, 5)
df4 = rand(5, 5)
df5 = rand(5, 5)

df1= DataFrame(df1)
df2= DataFrame(df2)
df3= DataFrame(df3)
df4= DataFrame(df4)
df5= DataFrame(df5)

@df df1 boxplot(:x1, title = "Comparing", ylabel = "Target biomass ratio", label = "10 animals")
@df df2 boxplot!(:x1, label = "25 animals")
@df df3 boxplot!(:x1, label = "50 animals")
@df df4 boxplot!(:x1, label = "75 animals")
@df df5 boxplot!(:x1, label = "100 animals", leg = false)
boxplot!(xlabel = ["10 animals", "25 animals" ,"50 animals", "75 animals", "100 animals"])

```

Producing this, which is close, but I don’t the numbers 1 through 5 and neither the quotation marks or square brackets around the x labels.

![image](https://global.discourse-cdn.com/julialang/original/3X/e/b/ebea1605f1c13d982c65da3d3d43a505afe58487.png)

In the future I want to include more dataframes, but have them grouped by the same x label. So

```julia
df1 = rand(5, 5)
df2= rand(5, 5)
df3 = rand(5, 5)
df4 = rand(5, 5)
df5 = rand(5, 5)

df6 = rand(5, 5)
df7 = rand(5, 5)
df8 = rand(5, 5)
df9 = rand(5, 5)
df10 = rand(5, 5)

df1= DataFrame(df1)
df2= DataFrame(df2)
df3= DataFrame(df3)
df4= DataFrame(df4)
df5= DataFrame(df5)

df6= DataFrame(df6)
df7= DataFrame(df7)
df8= DataFrame(df8)
df9= DataFrame(df9)
df10= DataFrame(df10)

```

With `df1` and `df6` having the same, singular label of “10 Animals” etc. Is there a way to do this? A work colleague suggested R and the melt function, but that is quite confusing to me and I’d rather work in Julia.
