# Plotting timeseries

**URL:** <https://discourse.julialang.org/t/plotting-timeseries/86539>\
**Category:** General Usage\
**Tags:** plotting, dates, plots\
**Created:** [August 30, 2022, 8:52am UTC](https://discourse.julialang.org/t/plotting-timeseries/86539 "2022-08-30T08:52:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![this\_josh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/this_josh/32/42679_2.png) [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Post date:** [August 30, 2022, 8:52am UTC](https://discourse.julialang.org/t/plotting-timeseries/86539/1 "2022-08-30T08:52:31Z")

</div>

I have 96 samples at 15 minute intervals. I’d like to plot this with a marker for each sample and the x axis to be appropriate for my sample times (00:00, 00:15,…) although not comprehensive.

```julia
using Dates
using Plots
y = rand(96)
x = Dates.Time("00:00"):Dates.Minute(15):Dates.Time("23:45")
plot(x, y, marker=:x)

```

This gives  
 ![Screenshot 2022-08-30 at 09.45.50](https://global.discourse-cdn.com/julialang/original/3X/1/8/18751c73453662b703c2ebffe9797f7e9eb452c0.png)  
where the x axis is confusing. How can I make it show 06:00:00, 12:00:00…?

This feels like it should be something trivial, so I presume I’m missing an obvious trick.

I have also tried `TimeSeries.jl` (`data = TimeArray(x,y); plot(data)`) but this gives the same result, presumably as it is the same plotting code.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [August 30, 2022, 9:22am UTC](https://discourse.julialang.org/t/plotting-timeseries/86539/2 "2022-08-30T09:22:44Z")

</div>

Just provide the ticks you want:

```julia
julia> plot(x, y, marker=:x, xticks = Time("00:00"):Hour(6):Time("23:45"))

```
