📜  在 r 中绘制多行 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:34.658000             🧑  作者: Mango

代码示例1
# Plotting the electrical parameters around the detected failure
library(devEMF)
emf(file = "Electrical parameters on inverter saturation.emf", emfPlus = TRUE)
plot(y=yRange$Pac, x=yRange$Time, type='l', ylim=c(0,1100), xlab='Time', ylab='Vmp, Pac, Imp', lwd=2)
lines(y=yRange$Pmp, x=yRange$Time, col='blue', lwd=2)
lines(y=yRange$Vmp, x=yRange$Time, col='red', lwd=2)
legend(yRange$Time[round(0.725*nrow(yRange))], 1100, legend=c("AC Power (kW)", "DC Power (kW)", "DC Voltage (V)"),
       col=c("black", "blue", "red"), lty=1, cex=0.8,
       title='Legend', text.font=4, bg='lightblue')
#lines(y=yRange$Imp, x=yRange$Time, col='purple', lwd=2)
#lines(y=yRange$GI, x=yRange$Time, col='green3', lwd=2)
dev.off()