0

enter image description here

I can't see all the labels on the x axis, I'm assuming that this is because they are too big and don't fit on. I've tried googling to see how I would rotate the labels but I can't see anything for the beanplot package, here is the code and plot:

beanplot(Contrast ~ ROI*Condition, data=Df,ll = 0.08,
         xlab = "AM depth",
         ylab = "ERA (arbitrary units)",
         col = list("black", c("grey", "white")),
         axes=T, beanlines = "median", ylim = c(-5, 15)) 
legend(3.7, 15.8,fill = c("grey", "black"), legend = c("RH", "LH"), cex=1)

plot

flaxel
  • 4,173
  • 4
  • 17
  • 30
Jammy
  • 1
  • 2

1 Answers1

0

With axis you can set where you want labels (with the x argument), and the rotation with srt (among other things). I Couldn't test it tho as you didn't provided your data.

axis(x=1:nrow(Df), srt=90)
  • Sorry I don't know how to share my data, I have tried the following code which gives me 6 ticks but still only displays the first 2 labels and they are not rotated `axis(1,at=c(1:6), labels =c ('8CHF LH', '8CHF RH','8CHR LH','8CHR RH','8CHZ LH','8CHZ RH'),srt=90)` – Jammy Nov 06 '20 at 16:02
  • see https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example .... (please do **not** include your data as a screenshot, that's the least useful format ...) – Ben Bolker Nov 06 '20 at 16:05