I want to format the numbers of the scale after the break as #.# x 10^# to match my other scales. I have done this for the scale before the break with a custom function, which substitutes scientific notation with 10^x notation. Thank you for the help.
scientific_10 = function(x) {
ifelse(
x==0, "0",
parse(text = sub("e[+]?", "%*%10^", scientific_format()(x)))
)
}
#example
test_plot <- ggplot(data, x = groups, y = values) +
geom_boxplot() +
scale_y_break(c(210000, 2025000), scales = 0.3, ticklabels = c(2.03e+06, 2.07e+06)) +
scale_y_continuous(limits = c(0, 2075000), label = scientific_10) +
theme(axis.text.y.right = element_blank(),
axis.ticks.y.right = element_blank(),
axis.line.y.right = element_blank())
here you go: