Place label marks on the x axis only within the construction area

Is it possible to put mark marks only on the x axis inside the print area? I'm trying to:

axis(1,at=c(0:71),c(rep(0:23,3)),cex.axis=.7, font=1,tck=.01)

It seems that

par(mgp=c(0,-1.4, 0)) 

places label tags xand yin the construction area.

+4
source share
1 answer

Why don't you just draw the ticks where you want them to use the argument posfor axis():

plot(0:72, xaxt="n")
text(0:71, -1, rep(0:23, 3), cex = 0.5)
axis(1, at=c(0:71), NA, cex.axis=.7, font=1, tck=.01)

enter image description here

+4
source

Source: https://habr.com/ru/post/1613177/


All Articles