Re: [R] scatterplot using plot() function with factorial data

2014-08-27 Thread Ista Zahn
Hi Luigi, See in line. On Wed, Aug 27, 2014 at 9:42 AM, Luigi Marongiu wrote: > Dear all, > I would like to ask whether is possible to draw a scatterplot using > the simple plot() function when the data is factorial. Without the > addition of the argument factor(), plot() represent the factorial

Re: [R] scatterplot using plot() function with factorial data

2014-08-27 Thread Richard M. Heiberger
With lattice graphics, yes libary(lattice) xyplot(y ~ z, data=my.data) bwplot(y ~ z, data=my.data) stripplot(y ~ z, data=my.data) With base graphics, probably not. More importantly, don't use attach. It will get you into trouble. In this case, it didn't work for me because I had a variable name

Re: [R] scatterplot using plot() function with factorial data

2014-08-27 Thread David L Carlson
It is, but stripchart() is simpler. plot(y~as.numeric(z), my.data, xlab="x", xaxt="n", pch=19) axis(1, 1:4, LETTERS[1:4]) If you want more spacing along the x-axis try plot(y~as.numeric(z), my.data, xlab="x", xaxt="n", xlim=c(.5, 4.5), pch=19) axis(1, 1:4, LETTERS[1:4]) ---