Closed maxeyre closed 1 year ago
Hi Max,
please send me a reproducible example so that I can see what is expected and where the labels should be - thanks!
Hi, actually just figured it out! The issue was actually just that the number of lines it automatically gave didn't line up as six-months or yearly, so lines were out of place not years.
The below (borrowed from your other issue) solved it, using the number of lines required to give it 6-monthly axis ticks:
gg_vistime(data, optimize_y = TRUE, linewidth = 30, background_lines = 16) +
scale_x_datetime(breaks = seq(min(as.POSIXct(data$start)),
max(as.POSIXct(data$end)),
"year"),
date_labels = "%Y") +
xlab("Year")
Thanks very much for your package by the way, very useful. One other question, is there any way to reduce the height of each group or spacing between each column?
Hi,
I'm not sure why but the x-axis years aren't aligned properly when I use your package - it starts on 2013-01-01 and ends on 2021-01-01. Code I am using is gg_vistime(data, optimize_y = TRUE, linewidth = 30)
Any ideas why this is or how I can change it?