In base
graphics we can easily add tick-marks at different sides of the plot by using axis
and the side
argument:
par(tck = 0.025)
plot(1:10)
axis(side = 3, labels = FALSE)
axis(side = 4, labels = FALSE)
How can I mirror x and y axis ticks on the top and right in ggplot2
? There is annotation_logticks
which can do this, but only seems to work well for logarithmic scales (as the name of the function applies). For linear scales, is there a similarly easy way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…