I saw the ideal tick-mark structure for a log=\"y\"
plot in this paper, Figure 3b 3c 3d.
It has short, log-spaced minor tick marks without labels, plus long
Here is a ggplot2
solution:
library(ggplot2)
set.seed(20180407)
df = data.frame(x = seq(from = 1, by = 1, length.out = 20),
y = 2^(seq(to = 1, by = -1, length.out = 20) + rnorm(20, 0, 0.7)))
ggplot(data = df, aes(x = x, y = y)) +
geom_line() +
scale_y_log10() +
annotation_logticks(sides = "l")
You can make it look even more than the paper you linked to with some theming:
ggplot(data = df, aes(x = x, y = y)) +
geom_line(colour = "blue") +
geom_point(colour = "blue") +
scale_y_log10() +
annotation_logticks(sides = "l") +
theme_minimal() +
theme(panel.grid = element_blank(),
axis.line = element_line(),
axis.ticks.x = element_line())