我正在使用 R 包 TraMineR 来计算和分析状态序列。我正在尝试使用seqrplot
命令进行绘图并更改 x 轴刻度标签。代码将是,例如:
library("TraMineR")
data("mvad")
mvad.alphab <- c("employment", "FE", "HE", "joblessness", "school", "training")
mvad.seq <- seqdef(mvad, 17:86, xtstep = 6, alphabet = mvad.alphab)
mvad.dist<-seqdist(mvad.seq, method="DHD")
seqrplot(mvad.seq, dist.matrix = mvad.dist,
criterion = "density", nrep = 1, title = "End CS qualification",
border = NA, axes=FALSE)
axis(1, at = c(1, 6, 12, 18, 24, 30, 36, 42, 48, 54,60,66,70),
labels = c(1, 6, 12, 18, 24, 30, 36, 42, 48, 54,60,66,70))
x 轴消失,但具有估算粗值的新轴出现在图的右下角某处。换句话说,它不会替换已删除的轴。有谁知道我做错了什么?谢谢