Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
347 views
ubuntu2004
Kernel: R (system-wide)
library(openxlsx) Data <- read.xlsx(paste(getwd(), "/b.xlsx", sep=""), startRow=4, colNames=FALSE) names(Data)
[1] "X1" "X2" "X3" "X4" "X5" "X6" "X7" "X8" "X9" "X10"
plotP_L = function(x, y, xlab, ylab, by, xlim, ylim) { x <- x[!is.na(x)] y <- y[!is.na(y)] sp <- splinefun(x, y) xest <- seq(min(x), max(x), by = by) yest <- sp(xest) plot(x, y, type="p",col="black", xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim) par(new=T) plot(xest, yest, type="l", col="black", xlab="", ylab="" , axes=FALSE, xlim=xlim, ylim=ylim, xaxt="n", yaxt="n") }
x1 <- Data$"X2" y1 <- Data$"X1" x2 <- Data$"X4" y2 <- Data$"X3" x3 <- Data$"X6" y3 <- Data$"X5" x4 <- Data$"X8" y4 <- Data$"X7" x5 <- Data$"X10" y5 <- Data$"X9" plotP_L(x1, y1, "Ifm", "Iam", 0.1, c(0, 2.5), c(0, 10)) par(new =T) plotP_L(x2, y2, "", "", 0.1, c(0, 2.5), c(0, 10)) par(new =T) plotP_L(x3, y3, "", "", 0.1, c(0, 2.5), c(0, 10)) par(new =T) plotP_L(x4, y4, "", "", 0.1, c(0, 2.5), c(0, 10)) par(new =T) plotP_L(x5, y5, "", "", 0.1, c(0, 2.5), c(0, 10))
Image in a Jupyter notebook