# How to plot more ticks in AlgebraOfGraphics or Makie?

**URL:** https://discourse.julialang.org/t/how-to-plot-more-ticks-in-algebraofgraphics-or-makie/77261
**Category:** General Usage
**Tags:** plotting, makie, algebraofgraphics
**Created:** [March 1, 2022, 9:35pm UTC](https://discourse.julialang.org/t/how-to-plot-more-ticks-in-algebraofgraphics-or-makie/77261 "2022-03-01T21:35:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![icweaver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/icweaver/32/45764_2.png) [@icweaver](https://discourse.julialang.org/u/icweaver)
#### Post date: [March 1, 2022, 10:40pm UTC](https://discourse.julialang.org/t/how-to-plot-more-ticks-in-algebraofgraphics-or-makie/77261/2 "2022-03-01T22:40:19Z")

</div>

I ran into this same issue too ([`LinearTicks` seems to alter the formatting for timeseries data · Issue #232 · MakieOrg/AlgebraOfGraphics.jl · GitHub](https://github.com/JuliaPlots/AlgebraOfGraphics.jl/issues/232)).

I think there is work being done upstream ([https://github.com/JuliaPlots/Makie.jl/pull/1347](https://github.com/JuliaPlots/Makie.jl/pull/1347)) so that we can handle time axes directly with Makie, but in the meantime @piever added this [convenience function](http://juliaplots.org/AlgebraOfGraphics.jl/dev/API/functions/#AlgebraOfGraphics.datetimeticks) in AoG that I think is really handy:

```julia
julia> using AlgebraOfGraphics, GLMakie, Dates

julia> t = DateTime(2021, 1, 1):Month(1):DateTime(2022, 1, 1);

julia> y = randn(length(t));

julia> df = (; t, y);

julia> ticks = AlgebraOfGraphics.datetimeticks(monthname, df.t[begin:2:end]);

julia> plt = data(df) * mapping(:t, :y) * visual(Lines);

julia> draw(plt; axis=(; xticks=ticks))

```

 ![index](https://global.discourse-cdn.com/julialang/original/3X/0/f/0ff85c50424b1e6f961e2394e0d7cfcd445d65c9.png)

You can pass any formatting function you want, although you will still need to play with the array of time points that is actually passed to it

---

_[View the full topic](https://discourse.julialang.org/t/how-to-plot-more-ticks-in-algebraofgraphics-or-makie/77261)._
