0

The following part of function hydrograph in EcoHydRology package produces the horizontal axis of the graph shown in the picture hosted in the link: http://postimg.org/image/a2u9x50vv/.

axis(side = 1, at = seq(1, (endindex - begin + 1), length = 14), 
            pos = 0, labels = format(timeSeries[seq(begin, endindex, 
            length = 14)], "%d-%b-%y %H:%M"))

I would like the label on the horizontal axis to be vertical (perpendicular to the axis) and each mark single mark to have a label.

To make it horizontal I have tried the following:

 axis(las = 1, side = 1, at = seq(1, (endindex - begin + 1), length = 14), 
                pos = 0, labels = format(timeSeries[seq(begin, endindex, 
                length = 14)], "%d-%b-%y %H:%M"))

But it did not work.

I have been looking in some webpages (it won't allow me to post the link) but could not figure that out.

Alan Alves
  • 61
  • 1
  • 2
  • 9
  • Look at ?axis and ?par. The `las` parameter is accepted. And if you want angles other than 90 degrees, then read R-FAQ 7.27 – IRTFM May 28 '14 at 21:55
  • I have used par(las =3) and changed the parameters in at. It worked! The problem now is that it does not fit within the margins. [link](http://postimg.org/image/m19kgm5nx/). I have tried par(las = 3, cin = c(0.1,0.1), mar(9,8,8,8) + 0.1), to both decrease the size of character (using cin parameter) and increase the margin (using mar parameter). As for the cin parameter I get the err "In par(las = 3, cin = c(0.1, 0.1)) : graphical parameter "cin" cannot be set". As for the mar parameters, id does not matter what number I input it simply does change the output. – Alan Alves May 29 '14 at 14:44
  • "did not work" is a rather useless description of a problem. The possible parameters for character size is either 'cex' or 'cex.lab' or 'cex.axis'. It sometimes depends on the exact function being used. The details should have been in the "..." entry of `?axis` – IRTFM May 29 '14 at 16:27
  • Hey thanks for the tips... I just read each parameter in the ?axis and could figure out. Thank you! – Alan Alves May 30 '14 at 13:34

0 Answers0