I have a stat_bin plot with a log scale on y-axis. I'm trying to insert log ticks on the y-axis here. But on using annotation_logticks(sides="l"), the log ticks are not aligning with the labels. I have attached a reference figure showing the problem.
q <- p + scale_y_continuous(expand = c(0, 0), trans = pseudo_log_trans(0.0001, 1000), breaks=c(0.001,0.01,0.1,1,10,100), limits=c(0.001,150), labels = scales::trans_format("log10", scales::math_format(10^.x)), sec.axis = sec_axis(~.*1500, name = "Sec. Axis", breaks=c(1,10,100,1000,10000,100000), labels = scales::trans_format("log10", scales::math_format(10^.x)))) q + annotation_logticks(sides="l")
How to align the log ticks accurately on the primary y-axis.