# How can I know the position for each label in the plot

**URL:** https://discourse.julialang.org/t/how-can-i-know-the-position-for-each-label-in-the-plot/133884
**Category:** New to Julia
**Tags:** plotting, statsplots
**Created:** [November 14, 2025, 6:31pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-position-for-each-label-in-the-plot/133884 "2025-11-14T18:31:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Lucca\_Da\_Paz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucca_da_paz/32/218447_2.png) [@Lucca\_Da\_Paz](https://discourse.julialang.org/u/Lucca_Da_Paz)
#### Post date: [November 14, 2025, 6:31pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-position-for-each-label-in-the-plot/133884/1 "2025-11-14T18:31:11Z")

</div>

How can I know the position in the x-axis for each label in my `violin(x, y, group = x, linewidth=1, dpi = 300) boxplot!(x, y, fillalpha=0.4, fillcolor = colorant"gray", linecolor=:black, linewidth=1, legend=false, dpi = 300) dotplot!(x, y, marker=(:black, stroke(0)), markeralpha=0.05, legend=false, dpi = 300) `where y is a numeric value but x is a category. I mean, like x = [“a”, “b”, “c”, “d”] ans y = [1, 2, 3,4], but I can’t dertermine where is the labels for my x-axis in the plot, the precise position of “a”, “b”, “c” and “d”.

---

<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: [November 15, 2025, 7:25am UTC](https://discourse.julialang.org/t/how-can-i-know-the-position-for-each-label-in-the-plot/133884/2 "2025-11-15T07:25:11Z")

</div>

Hello, please use `xticks()`:

```julia-auto
using StatsPlots, Random

x = ["a" "b" "c" "d"]
y = randn(1000, 4)
p = violin(x, y)
xticks(p)

```
