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

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") |

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")) |

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

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

> 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), ...)
+ }) |
