# Is there a way to hide the boxplots names on the x axis?

**URL:** <https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223>\
**Category:** General Usage\
**Tags:** plotting, plots, statsplots\
**Created:** [August 23, 2022, 9:04pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223 "2022-08-23T21:04:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Mac\_Donagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan_mac_donagh/32/31798_2.png) [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Post date:** [August 23, 2022, 9:04pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223/1 "2022-08-23T21:04:05Z")

</div>

Hi, I was wondering if there was a way to hide the names of each boxplots using StatsPlots grouped boxplots. I looked into both Plots and StatsPlots documentation, but I couldn’t find an argument atribute for it.

Here’s some sample data:

```julia
	df_test = DataFrame()
	df_test.id = ["One","One","One", "Two","Two"]
	df_test.value = [2,15,19,30,56]

    p1 = @df df_test boxplot(string.(:id), :value, fillalpha=0.75, linewidth=2, group = :id,legend=false) 

```

And here’s is the output:

 ![ejemplojulia](https://global.discourse-cdn.com/julialang/original/3X/6/4/646cdaf032b40b3b9bddf71f1e387b501851d937.png)

I want to generate the same plot, but without the “One” and “Two” labels under the x axis.

Thanks in advance,

---

<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:** [August 23, 2022, 9:15pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223/2 "2022-08-23T21:15:13Z")

</div>

Use boxplot keyword argument: `x_foreground_color_text=:transparent`

or:  
`xticks=false`

---

<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:** [August 23, 2022, 9:23pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223/3 "2022-08-23T21:23:21Z")

</div>

Another way is to do post-processing:

```julia
old_xticks = xticks(p1[1])
new_xticks = (old_xticks[1], ["", ""])
xticks!(new_xticks)

```

---

<div class="post-metadata">

**Author:** ![Juan\_Mac\_Donagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan_mac_donagh/32/31798_2.png) [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Post date:** [August 24, 2022, 1:09am UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-the-boxplots-names-on-the-x-axis/86223/4 "2022-08-24T01:09:00Z")

</div>

The second solution worked great! I had a problem with the first one, because (I just realized) that I was already using xticks to add some things to the plot.  
Thanks a lot!
