开发者

Horizontal dotplot in R

开发者 https://www.devze.com 2023-02-21 11:40 出处:网络
Is it possible to create a dotplot - dotchart() - in R wi开发者_StackOverflowth a horizontal orientation? If you use the dotplot from the lattice package, there is an argument named horizontal that co

Is it possible to create a dotplot - dotchart() - in R wi开发者_StackOverflowth a horizontal orientation?


If you use the dotplot from the lattice package, there is an argument named horizontal that controls direction.

dotplot(VADeaths, main = "Death Rates in Virginia - 1940", horizontal = FALSE)
dotplot(VADeaths, main = "Death Rates in Virginia - 1940", horizontal = TRUE)


It is not quite clear to me what you mean by horizontal, but you might compare the effect of

dotchart(VADeaths, main = "Death Rates in Virginia - 1940")

and its transpose

dotchart(t(VADeaths), main = "Death Rates in Virginia - 1940")
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号