1

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
agamesh
  • 559
  • 1
  • 10
  • 26
  • 1
    It will be helpful if you pose your question with some minimal reproducible code and sample data. See this question for help: http://stackoverflow.com/q/5963269/602276 – Andrie Aug 23 '11 at 12:48

1 Answers1

4

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:

spineplot(fail~temperature,yaxlabels=NA)

But if you want to orient them horizontally, you normally set las=1. Unfortunately, spineplot doesn't seem to pass this on, so you need to do a call to par first:

par(las=1)
spineplot(fail~temperature)
James
  • 65,548
  • 14
  • 155
  • 193