I use the library (ggseqplot)
to display a TraMineR
graph in ggplot2
format.
library(ggseqplot)
plot <- ggseqdplot(mvad.seq)
I would like to modify the x axis labels which is continuous from y1 to y1440 (1 minute to 1440), and add y100, y200, y300, etc.
I can't transmit the data because it's quite heavy. Is there any way of changing the axis labels to suit us? This library is supposed to make things easier. Many thanks!
The library indeed makes plotting easier, assuming some familiarity with
ggplot2
functions (just likeTraMineR
's plot functions require some knowledge of base R'splot
environment if you want to modify them). In this case, you need to know how to change the appearance of axis scales and that the position scale of the sequences - usually indicating time points - is conceived as a discrete scale. Hence, you need to use the functionscale_x_discrete()
to adjust the axis.Created on 2023-11-30 with reprex v2.0.2