Dear R experts, Can R make an usual dotplot just like Minitab and other softwares? I have the following data, and can use dotchart to graph a dotplot: y=c(2.873438152e-01, -8.732895642e-01, 4.579001889e-01, 1.047395204e+00, 8.491182299e-02 , -1.938007105e+00, -1.273708343e+00, 9.848010588e-05, 7.238490734e-01, -1.490552717e+00) dotchart(y, xlab="10 observations from N(0,1)", xlim=c(-2, 4), pch=19) But I don't want the dots on different level of y-axis since y-axis has no meaning here. I also tried to load the package 'UsingR' DOTplot(y0) DOTplot(y1) These two functions can plot the graphs I need but I cannot label the x-axis, choose the type of the dot, limit the x-axis, etc. these features don't work in DOTplot. Is there a way I can get a dotplot in R which is look like the plot graphed by DOTplot but has the features other plots can have in R? Many many thanks! -- View this message in context: http://n4.nabble.com/Can-R-make-an-usual-dotplot-tp1559649p1559649.html Sent from the R help mailing list archive at Nabble.com.
R can't do anything. The question is whether you can do it with R. R puts you in the driver seat and if necessary gives you the mechanic's tookkit so that you can tinker underneath the bonnet if need be. If the function you like isn't quite there, have a look at the code and adjust it. It's unlikely you will really need to do this if the code has been properly written, but the option is always there, and you could learn a great deal from the experience. Alternatively if you really want minitab, well, as they say, you know where to find it. Bill Venables CSIRO/CMIS Cleveland Laboratories -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of aegea Sent: Thursday, 18 February 2010 2:47 PM To: r-help at r-project.org Subject: [R] Can R make an usual dotplot Dear R experts, Can R make an usual dotplot just like Minitab and other softwares? I have the following data, and can use dotchart to graph a dotplot: y=c(2.873438152e-01, -8.732895642e-01, 4.579001889e-01, 1.047395204e+00, 8.491182299e-02 , -1.938007105e+00, -1.273708343e+00, 9.848010588e-05, 7.238490734e-01, -1.490552717e+00) dotchart(y, xlab="10 observations from N(0,1)", xlim=c(-2, 4), pch=19) But I don't want the dots on different level of y-axis since y-axis has no meaning here. I also tried to load the package 'UsingR' DOTplot(y0) DOTplot(y1) These two functions can plot the graphs I need but I cannot label the x-axis, choose the type of the dot, limit the x-axis, etc. these features don't work in DOTplot. Is there a way I can get a dotplot in R which is look like the plot graphed by DOTplot but has the features other plots can have in R? Many many thanks! -- View this message in context: http://n4.nabble.com/Can-R-make-an-usual-dotplot-tp1559649p1559649.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.
aegea wrote:> > > Can R make an usual dotplot just like Minitab and other softwares? > > I have the following data, and can use dotchart to graph a dotplot: > > .... > > But I don't want the dots on different level of y-axis since y-axis has no > meaning here. >y = rnorm(10) plot(y,rep(1,10),xlab="hallo",ylab="what?") library(lattice) dotplot(y,xlab="hallo",ylab="what?") Dieter -- View this message in context: http://n4.nabble.com/Can-R-make-an-usual-dotplot-tp1559649p1559732.html Sent from the R help mailing list archive at Nabble.com.
Hi: Another solution is found in package BHH2, associated with the second edition of the classic Box, Hunter and Hunter text. Illustration of both BHH2 and plotrix: x <- c(2, 4, 5, 5, 6, 4, 5, 2, 1) library(BHH2) dotPlot(x, pch = 16, xlab = "") library(plotrix) # thanks to Peter dotplot.mtb(x) The BHH2 version allows you to stack several dot plots. The plotrix version gives you several display options. HTH, Dennis On Wed, Feb 17, 2010 at 8:46 PM, aegea <gcheer3@gmail.com> wrote:> > Dear R experts, > > Can R make an usual dotplot just like Minitab and other softwares? > > I have the following data, and can use dotchart to graph a dotplot: > > > y=c(2.873438152e-01, -8.732895642e-01, > 4.579001889e-01, 1.047395204e+00, > 8.491182299e-02 , -1.938007105e+00, > -1.273708343e+00, 9.848010588e-05, > 7.238490734e-01, -1.490552717e+00) > > dotchart(y, xlab="10 observations from N(0,1)", xlim=c(-2, 4), pch=19) > > > But I don't want the dots on different level of y-axis since y-axis has no > meaning here. > I also tried to load the package 'UsingR' > DOTplot(y0) > DOTplot(y1) > These two functions can plot the graphs I need but I cannot label the > x-axis, choose the type of the dot, limit the x-axis, etc. these features > don't work in DOTplot. > > Is there a way I can get a dotplot in R which is look like the plot graphed > by DOTplot but has the features other plots can have in R? > > Many many thanks! > -- > View this message in context: > http://n4.nabble.com/Can-R-make-an-usual-dotplot-tp1559649p1559649.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >[[alternative HTML version deleted]]