Dear All, Can R produce dot plots like the one of the following picture: http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png ? I have tried dotchart, but no success. Thanks in advance, Paul
stripchart would probably work, e.g., data<-matrix(c(rep(1,4),rep(2,4),rep(3,10),rep(4,8),rep(5,11)), ncol=1) stripchart(data, method="stack", pch=16) On Nov 24, 2007 3:26 PM, Paul Smith <phhs80@gmail.com> wrote:> Dear All, > > Can R produce dot plots like the one of the following picture: > > http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png > > ? > > I have tried dotchart, but no success. > > Thanks in advance, > > Paul > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- *************** A. Alexander Beaujean, Ph.D., LSSP Licensed Psychologist (Provisional, TX) http://myprofile.cos.com/abeaujean http://www.baylor.edu/soe/faculty/index.php?id=38476 "General impressions are never to be trusted. Unfortunately when they are of long standing they become fixed rules of life, and assume a prescriptive right not to be questioned. Consequently those who are not accustomed to original inquiry entertain a hatred and a horror of statistics. They cannot endure the idea of submitting their sacred impressions to cold-blooded verification. But it is the triumph of scientific men to rise superior to such superstitions, to devise tests by which the value of beliefs may be ascertained, and to feel sufficiently masters of themselves to discard contemptuously whatever may be found untrue." --Sir Francis Galton, FRS [[alternative HTML version deleted]]
On 11/24/07, Paul Smith <phhs80 at gmail.com> wrote:> Dear All, > > Can R produce dot plots like the one of the following picture: > > http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png > > ? > > I have tried dotchart, but no success.Try ?stripchart -Deepayan
Does this give you want you want? x <- sample(1:10) plot(rep(1:10, x), unlist(sapply(x, seq)), pch=19, cex=3, yaxt='n') On Nov 24, 2007 4:26 PM, Paul Smith <phhs80 at gmail.com> wrote:> Dear All, > > Can R produce dot plots like the one of the following picture: > > http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png > > ? > > I have tried dotchart, but no success. > > Thanks in advance, > > Paul > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?
Yes, with the HH package. require(HH) dotplot(sample(0:9, 50, replace=TRUE), panel=panel.dotplot.tb) dotplot(rep(1:5,10) ~ sample(0:9, 50, replace=TRUE), panel=panel.dotplot.tb) dotplot(rep(1:5,10) ~ sample(0:9, 50, replace=TRUE) | rep(c(1,1,1,2,2),10), panel=panel.dotplot.tb) dotplot(~ sample(0:9, 50, replace=TRUE) | rep(c(1,1,1,2,2),10), panel=panel.dotplot.tb)
On Saturday 24 November 2007, Paul Smith wrote:> Dear All, > Can R produce dot plots like the one of the following picture: > http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png > ? > I have tried dotchart, but no success.I'm coming late to this thread, but I believe what Paul wants is better suited by the DOTplot() function from the UsingR package: it looks exactly the same as the web image and it has no axes, as Paul wants in a later message. x <- sample(1:10, 30, replace=T) library(UsingR) DOTplot(x) Hth, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101