# \donttest{
if (require(ggplot2) && require(scales)) {
set.seed(123)
df <- data.frame(
x = 1:100,
y_raw = c(0, 0.1, 0.5, 1, 5, 10, 50, 100, 500, 1000, sample(1:2000, 90, replace = TRUE))
)
# Plot with y-axis on LL4 scale
ggplot(df, aes(x = x, y = y_raw)) +
geom_point() +
scale_ll4(name = "Y-axis (LL4 Scale)", lambda = 4) +
ggtitle("Data with LL4 Transformed Y-Axis")
# Can also be used for x-axis by replacing scale_y_continuous in its definition
# Or by creating a scale_x_ll4 variant.
}
# }
Run the code above in your browser using DataLab