# Access the xticks of a Plots.jl plot

**URL:** <https://discourse.julialang.org/t/access-the-xticks-of-a-plots-jl-plot/77676>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [March 10, 2022, 9:29am UTC](https://discourse.julialang.org/t/access-the-xticks-of-a-plots-jl-plot/77676 "2022-03-10T09:29:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [March 10, 2022, 9:31am UTC](https://discourse.julialang.org/t/access-the-xticks-of-a-plots-jl-plot/77676/2 "2022-03-10T09:31:36Z")

</div>

Found the solution in [Plots.jl xticks color modification - Specific Domains / Visualization - JuliaLang](https://discourse.julialang.org/t/plots-jl-xticks-color-modification/74800/2).

There is a function `xticks`. The final line in the example below returns the xticks of the figure:

```julia
using Plots
xs = 1:10
ys = xs .^ 2
plt = plot(xs, ys)
xticks(plt)

```

---

_[View the full topic](https://discourse.julialang.org/t/access-the-xticks-of-a-plots-jl-plot/77676)._
