> library(lattice)
> dotplot(VADeaths, groups = F)

Chapter_4_1-001.jpg

To improve the dotplot , one can improve on the plots

> dotplot(VADeaths, groups = F, layout = c(1, 4), aspect = 0.7,
+     origin = 0, type = c("p", "h"), main = "Death Rates in Virgina - 1940",
+     xlab = "Rate")

Chapter_4_1-002.jpg

Removing the groups argument and plotting everything in a single graph

> dotplot(VADeaths, type = "o", origin = 0, main = "Sample Title ",
+     xlab = "Sampl Rate", auto.key = list(lines = T, space = "right"))

Chapter_4_1-003.jpg

> data(postdoc, package = "latticeExtra")
> barchart(prop.table(postdoc, margin = 1), xlab = "proportion",
+     auto.key = list(adj = 1))

Chapter_4_1-004.jpg

> dotplot(prop.table(postdoc, margin = 1), groups = F, xlab = "prop",
+     par.strip.text = list(abbreviate = T, minlength = 10))

Chapter_4_1-005.jpg

> dotplot(prop.table(postdoc, margin = 1), groups = FALSE, index.cond = function(x,
+     y) median(x), xlab = "Proportion", layout = c(1, 5), aspect = 0.6,
+     scales = list(y = list(relation = "free", rot = 0)), prepanel = function(x,
+         y) {
+         list(ylim = levels(reorder(y, x)))
+     }, panel = function(x, y, ...) {
+         panel.dotplot(x, reorder(y, x), ...)
+     })

Chapter_4_1-006.jpg