# Using dates as axis labels

**URL:** <https://discourse.julialang.org/t/using-dates-as-axis-labels/73294>\
**Category:** New to Julia\
**Tags:** glmakie\
**Created:** [December 18, 2021, 9:28am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294 "2021-12-18T09:28:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [December 18, 2021, 9:28am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294/1 "2021-12-18T09:28:22Z")

</div>

Hi,

I can’t figure out how to display a string, eg representing a date for the x axis labels for time series data using makie.jl. Perhaps this is just a symptom of a broader level of incompetance.

I tried something like this

```julia
series!(ax, plotdata[1:100], labels=string.(datedata[1:100]),solid_color=:black)

```

but the labels just get ignored and the x axis just shows an integer reflecting the position of the value in plotdata.

I feel like I’m missing something important with Makie. I don’t have a matlab or python or plotting background so all the terminology using in the Makie api is foreign and I can’t find any documentation to get me up to speed.  
Can someone point me to some documents or examples showing how this is done?

and/or pointers to some conceptual documentation. The website and the api docs are just not helping because of my skill gaps.

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [December 18, 2021, 9:41am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294/2 "2021-12-18T09:41:45Z")

</div>

Here’s the section that explains axis ticks: [https://makie.juliaplots.org/stable/examples/layoutables/axis/#modifying\_ticks](https://makie.juliaplots.org/stable/examples/layoutables/axis/#modifying_ticks)

---

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [December 19, 2021, 5:22am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294/3 "2021-12-19T05:22:53Z")

</div>

Thanks Jules,

That’s the section I have been reading but so much of it is over my head. eg the following is interesting to me

```julia
tickvalues, ticklabels = MakieLayout.get_ticks(ticks, scale, formatter, vmin, vmax)
tickvalues = MakieLayout.get_tickvalues(ticks, vmin, vmax)
ticklabels = MakieLayout.get_ticklabels(formatter, tickvalues)

```

but these functions don’t appear when I search the api and I can find any information about their usage or examples. I don’t even understand what each of these parameters are. I know I’m missing something but just can’t see how to find it or the best approach to learn. It’s like I’m missing the standard plotting language manual.

Steve

---

<div class="post-metadata">

**Author:** ![George9000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/george9000/32/23619_2.png) [@George9000](https://discourse.julialang.org/u/George9000)\
**Post date:** [December 19, 2021, 5:35am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294/4 "2021-12-19T05:35:57Z")

</div>

Steve,

Take a look [here](https://lazarusa.github.io/BeautifulMakie/ScattersLines/timeSeries/); the site has many other plotting examples with Makie. That particular example also makes use of [the time series package](https://juliastats.org/TimeSeries.jl/latest/getting_started/). That package also details [some examples](https://juliastats.org/TimeSeries.jl/latest/plotting/) using a different plotting package.

---

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [December 20, 2021, 8:19am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294/5 "2021-12-20T08:19:56Z")

</div>

Thanks for the great links George.
