1

In drawing a plot with R, the X-axe labels are horizontal, I want a vertical labels.Is it possible?

For example, such this:

Fig1

user2227801
  • 85
  • 1
  • 8

1 Answers1

1

The question of rotating isduplicated ad is answered many times here. But I add this answer for 2 reasons :

  1. the ticks labels are long so we need to add margins at bottom
  2. the ticks labels are a little bit complicated and created using plotmath

enter image description here This is the code:

par(mar=c(8, 4, 2, 4))
plot(1:5,1:5,xaxt='n',frame.plot=FALSE,xlab='')
expr1 <- expression(L[2](delta[J~S](X,W),theta))
expr2 <- expression(L[4](delta[J~S](X,W),theta))
axis(1,las=2,labels=c(expr1,expr1),at=2:3,pos=1)
arrows(0,1,5,1)
agstudy
  • 119,832
  • 17
  • 199
  • 261