Dear All, I want to plot a simple cumulative probability distribution graph with like the attached screenshot. But I couldn't fix the y-axis scale as in that screenshot. My data details are follows: y_values =c(66.78149,76.10846,81.65518,85.06448,87.61703,89.61314,91.20297,92.36884, 93.64070,94.57693,95.23052,95.75163,96.15792,96.58188,96.97933,97.29730, 97.59760,97.91556,98.14520,98.37485,98.57799,98.74580,98.87829,99.06377, 99.16093,99.25808,99.37290,99.45239,99.54072,99.59371,99.62904,99.66437, 99.69970,99.70853,99.72620,99.73503,99.77036,99.79686,99.80569,99.82335, 99.83219,99.84985,99.86751,99.87635,99.87635,99.90284,99.90284,99.90284, 99.91168,99.92051,99.92051,99.93817,99.93817,99.93817,99.95584,99.95584, 99.97350,99.97350,99.97350,99.97350,99.97350,99.97350,99.97350) x_value=seq(63) Thank you all in advance Dileepkumar R
Dear Dileepkumar R, On 2020-07-27 19:13 +0530, Dileepkumar R wrote: | Dear All, | | I want to plot a simple cumulative | probability distribution graph with | like the attached screenshot. The screenshot disappeared somewhere. Perhaps you can try to upload it somewhere, or attach it as a png? | But I couldn't fix the y-axis scale as | in that screenshot. You scale the y axis using ylim, removing it using yaxt="n", defining a new one using graphics::axis like in the last example in ?graphics::plot: png( filename = "/tmp/ecdf.png", width = 480, height = 480, units = "px", pointsize = 12, bg = "transparent", res = 100) ymin <- 0 ymax <- 100 graphics::plot( x=x_value, y=y_values, ylim=c(ymin,ymax), yaxt="n") e.y <- ymin:ymax at.y <- 10^e.y FUN <- function(E) bquote(10^.(E)) labels <- as.expression( parallel::mclapply(X=e.y, FUN=FUN)) graphics::axis( side=2, at = at.y, col.axis = "orange", las = 1, labels = labels) dev.off() Best, Rasmus -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200727/f6094fcc/attachment.sig>
I think the attached sample figure is not visible Here is the sample figure: https://drive.google.com/file/d/16Uy3JD0wsEucUv_KOhXCxLZ4U-3wiBTs/view?usp=sharing sincerely, Dileepkumar R On Mon, Jul 27, 2020 at 7:13 PM Dileepkumar R <dileepkunjaai at gmail.com> wrote:> Dear All, > > I want to plot a simple cumulative probability distribution graph with > like the attached screenshot. > But I couldn't fix the y-axis scale as in that screenshot. > > My data details are follows: > > y_values > =c(66.78149,76.10846,81.65518,85.06448,87.61703,89.61314,91.20297,92.36884, > 93.64070,94.57693,95.23052,95.75163,96.15792,96.58188,96.97933,97.29730, > 97.59760,97.91556,98.14520,98.37485,98.57799,98.74580,98.87829,99.06377, > 99.16093,99.25808,99.37290,99.45239,99.54072,99.59371,99.62904,99.66437, > 99.69970,99.70853,99.72620,99.73503,99.77036,99.79686,99.80569,99.82335, > 99.83219,99.84985,99.86751,99.87635,99.87635,99.90284,99.90284,99.90284, > 99.91168,99.92051,99.92051,99.93817,99.93817,99.93817,99.95584,99.95584, > 99.97350,99.97350,99.97350,99.97350,99.97350,99.97350,99.97350) > > x_value=seq(63) > > Thank you all in advance > > Dileepkumar R >[[alternative HTML version deleted]]
On 27/07/2020 11:56 a.m., Dileepkumar R wrote:> I think the attached sample figure is not visible > Here is the sample figure: > https://drive.google.com/file/d/16Uy3JD0wsEucUv_KOhXCxLZ4U-3wiBTs/view?usp=sharing > > sincerely, > > > Dileepkumar R > > > > > On Mon, Jul 27, 2020 at 7:13 PM Dileepkumar R <dileepkunjaai at gmail.com> > wrote: > >> Dear All, >> >> I want to plot a simple cumulative probability distribution graph with >> like the attached screenshot. >> But I couldn't fix the y-axis scale as in that screenshot. >> >> My data details are follows: >> >> y_values >> =c(66.78149,76.10846,81.65518,85.06448,87.61703,89.61314,91.20297,92.36884, >> 93.64070,94.57693,95.23052,95.75163,96.15792,96.58188,96.97933,97.29730, >> 97.59760,97.91556,98.14520,98.37485,98.57799,98.74580,98.87829,99.06377, >> 99.16093,99.25808,99.37290,99.45239,99.54072,99.59371,99.62904,99.66437, >> 99.69970,99.70853,99.72620,99.73503,99.77036,99.79686,99.80569,99.82335, >> 99.83219,99.84985,99.86751,99.87635,99.87635,99.90284,99.90284,99.90284, >> 99.91168,99.92051,99.92051,99.93817,99.93817,99.93817,99.95584,99.95584, >> 99.97350,99.97350,99.97350,99.97350,99.97350,99.97350,99.97350) >> >> x_value=seq(63) >> >> Thank you all in advance >>You need to figure out what scale was used. It looks to me like a logit scale in y/100. If that's right, this may show what you want: scale <- function(y) log(y/100/(1-y/100)) plot(x_value, scale(y_values), axes = FALSE) axis(1) ticks <- c(10, 30, 50, 90, 99, 99.9, 99.99, 99.999) axis(2, at=scale(ticks), labels=ticks) box() It doesn't have as large a range as your plot; this will match that: plot(x_value, scale(y_values), axes = FALSE, ylim = scale(c(10, 99.9995))) The rest of the code is the same. Duncan Murdoch