#!/usr/bin/env Rscript cpu0=read.table("cpu_user0", header=T) cpu1=read.table("cpu_user1", header=T) png(filename="desktop_off_on.png", width=800,height=600) #pdf(file="test.pdf") plot( cpu0$Time, cpu0$user, type="l", col="2", xlab="時間(秒)", ylab="%user", ylim=c(-5,105), main="systemctl stop/start display-manager.service" ) points( cpu1$Time, cpu1$user, type="l", col="3" ) legend("topright",c("CPU0", "CPU1"), pch = 15, col = c(2,3) ) warnings() dev.off()