-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Hi, thanks for such a cool package! I am copying this discussion from the slack here regarding formatting ticklabels from timeseries data:
@icweaver said: I have some timeseries data that I was hoping to plot with AoG. The problem I am having is with the label formatting for something like this:
using AlgebraOfGraphics, CairoMakie, Dates, DataFrames
df = DataFrame(
:t => DateTime("2021-01-01T00:00:00"):Hour(1):DateTime("2021-01-02T00:00:00"),
:f => sort(rand(25))
)
plt = data(df) * mapping(:t=>"time", :f=>"flux")
draw(plt)which seems to crowd the tick labels

I see that I can rotate things by passing draw(plt, axis=(xticklabelrotation=π/8,)) so I was wondering if there was also a similar way to modify the date formatting with some combination of xticks and xtickformat with Dates.format?
@ericphanson mentioned that it might have been possible to reduce the number of tickmarks in the past with xticks=LinearTicks(N), but that seems to also alter the original formatting of the ticklabels:

Is there another approach that we should be following to apply the desired formatting?