#!/usr/bin/env Rscript cpu0=read.table("cpu_user_0", header=T) cpu1=read.table("cpu_user_1", header=T) cpu2=read.table("cpu_user_2", header=T) cpu3=read.table("cpu_user_3", header=T) png(filename="cpu_user.png", width=800,height=600) #pdf(file="test.pdf") plot( cpu0$Time, cpu0$user, type="l", col="1", xlab="時間(秒)", ylab="user(%)", ylim=c(-5,105), main="RasPi2 lxde stop start user" ) points( cpu1$Time, cpu1$user, type="l", col="2" ) points( cpu2$Time, cpu2$user, type="l", col="3" ) points( cpu3$Time, cpu3$user, type="l", col="4" ) legend("topright",c("CPU0", "CPU1", "CPU2", "CPU3"), pch = 15, col = c(1,2,3,4) ) warnings() dev.off()