[R] Axis with inverse logarithmic scale
Rasmus Liland
jr@| @end|ng |rom po@teo@no
Mon Jul 27 16:44:13 CEST 2020
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>
More information about the R-help
mailing list