I could not manage to remove the y axis labels from a conditional density plot (cdplot{graphics}) in order to rotate them horizontally later; axes = FALSE seems not to work. Any idea?
Thanks!
Using the example data from R documentation:
fail <- factor(c(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1),
levels = 1:2, labels = c("no", "yes"))
temperature <- c(53, 57, 58, 63, 66, 67, 67, 67, 68, 69, 70, 70, 70, 70, 72, 73, 75, 75, 76, 76, 78, 79, 81)
cdplot(fail ~ temperature, axes = FALSE)
Warning messages:
1: In density.default(x, bw = bw, n = n, ...) :
non-matched further arguments are disregarded
2: In density.default(x[y %in% levels(y)[seq_len(i)]], bw = dx$bw, :
non-matched further arguments are disregarded
Since you are not giving us any data, I’m using the data provided in
example(spineplot).You can get rid of the axis labels by setting the appropriate parameter to
NA:But if you want to orient them horizontally, you normally set
las=1. Unfortunately,spineplotdoesn’t seem to pass this on, so you need to do a call toparfirst: