The following code is a short tutorial to make a simple chart using lattice package. I use the electricity consumption data from US Dept.of Energy. To make a simple plot using R is a learning curve. It is straight forward, so you will be able to use it, once you get the basic properties.
require("lattice")
## Loading required package: lattice
data <- read.csv("enconsump.csv")
mydata <- data[c(1:29), ]
xyplot using the available dataxyplot(mydata$Country ~ mydata$X2007 + mydata$X2008 + mydata$X2009 + mydata$X2010 +
mydata$X2011, main = "Electricity consumption (2007-2011)", type = "p",
pch = 16, auto.key = list(x = 0.7, y = 0.8, text = c("2007", "2008", "2009",
"2010", "2011"), title = "Year"), ylab = "countries", xlab = "billion Kwh")
plot using manually-entered datamain : setting chart titletype="b" : type both point and linepch=16 : setting point type xaxt="n" : no axis labelxlab : setting x axis labelylab : setting y axis labelaxis(1...: setting x tick labeltotal <- c(17149.41987, 17410.00845, 17316.83824, 18501.4416, 19298.53181)
plot(total, main = "World's total electricity consumption", type = "b", pch = 16,
xaxt = "n", xlab = "Years", ylab = "energy consumption, in billion Kwh")
axis(1, at = 1:5, labels = c("2007", "2008", "2009", "2010", "2011"))
#References: Energy Report-US Dept of Energy