R言語入門 >
x <- c(1, 2, 3, 4, 5) y <- c(2, 3, 4, 8, 10) #dev.new() # 描画デバイスを開く png("plot1.png", width=480, height=480) # pngファイルを描画デバイスとして開く plot(x, y) # グラフを描く #points(approx(x, y)) # 線形補間 lines(x, y) # 折れ線グラフ dev.off() # 描画デバイスを閉じる