I want to create a cumulative frequency plot with probability scaling on the y-axis. When I transform the y-axis from the regular scaling to the probability scaling, the scale is not applied correctly.
plt <- ggplot(df, aes(df[,"test_values"]))
plt = plt + stat_ecdf()
last_plot()
plt = plt + stat_ecdf(geom="point")
last_plot()
last_plot()
plt = plt + ylab("Cumulative Frequency")
last_plot()
plt = plt + scale_x_continuous(labels = scales::scientific,breaks = scales::pretty_breaks(n = 8))
last_plot()
Until this line everything is fine:
Then I want to scale the y axis
plt = plt + scale_y_continuous(trans=probability_trans("norm"), breaks=c(0.001,0.01,0.05,0.25,0.5,0.75,0.95,0.99,0.999))
last_plot()
I would expect the value to be from 0 to 1 and not from 0.5 to 0.95.
I have scales version 1.2.1 and ggplot2 3.4.0 with R version 4.2.2