ruk·si

📊 R
Line Plot

Updated at 2011-09-04 23:45

Creating a line plot in R.

plot(
    x= temp$V2,
    type= "l",
    ylim= c(-25,25),
    xlab= "Time",
    ylab= "Temperature",
    main= "Recorded mean temperature in Turku in 2010",
    sub= "by Tommi Laine, source www.stat.fi",
    xaxt="n"
)
x <- c(1,32,60,91,121,152,182,213,244,274,305,335,365)
axis(1, at=x, labels=temp$V1[x])

# axis() is used to make labels for y axis.