Created
December 10, 2019 12:05
-
-
Save axjack/96d3d28e64e51f84d43385f45ed9a2a1 to your computer and use it in GitHub Desktop.
経過時間をプロットする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pc.data <- c("2019-12-10 19:13:10.100", | |
"2019-12-10 19:13:10.200", | |
"2019-12-10 19:15:21.344", | |
"2019-12-10 19:16:25.344", | |
"2019-12-10 19:16:28.134", | |
"2019-12-10 19:18:25.56", | |
"2019-12-10 19:19:31.798" | |
) | |
options(digits.secs=3) | |
pc.data.po <- as.POSIXct(pc.data,format="%Y-%m-%d %H:%M:%OS") | |
x = pc.data.po - pc.data.po[1] | |
y = 1.3 * ( pc.data.po - pc.data.po[1] ) | |
xn <- length(x) | |
plot(as.numeric(x), type="l", xlim=c(1,xn),xaxp=c(1,xn,3), ylim=c(0,1.5*max(as.numeric(x))), xlab="Event Number", ylab="Elapsed Time(sec)", main="Server vs PC") | |
par(new=T) | |
plot(as.numeric(y), type="l", col="red", ylim=c(0,1.5*max(as.numeric(x))), xaxt="n", yaxt="n",ylab="",xlab="") | |
legend("topleft",legend=c("svr","pc"),col=c("black","red"), lty=c(1,1)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
グラフを描く上での参考URL