I have started using biplot() (with R1.3.0 on Windows) and have become very frustrated. As far as I can see, I follow the directions but either it doesn't do what I want it to do, it gives fairly arcane error messages or both. All I want to do is plot two separate data sets to see how different they are from each other with respect to two metrics that are represented by the two axes. My first problem is that biplot forms two axes: the bottom and left axes for the former data set and the top and right axes for the latter set. Invariably, these axes are scaled differently so it look like the data sets are easy to distinguish until I realise that they are plotted on different axes. I try to make all the axes the same by doing> biplot(former_set, latter_set,xlim <- 0:3,ylim <- 0:3)This sets the left and bottom axes to the required range but not the top or right axis. I also do not want the arrow heads, so I enter> biplot(former_set, latter_set,arrow.len=0)I do not get the arrows but I do get the following error message. Error in arrows(x0, y0, x1, y1, length = length, angle = angle, code = code, : invalid head length This depite the fact that the help for biplot says " The arrow head can be suppressed by `arrow.len = 0'.". The program also does not appear to like it when I enter> biplot(former_set, latter_set,var.axis=FALSE,colour)I get 11 warnings, all saying 'parameter "var.axis" couldn't be set in high-level plot() function' but the graph does not look any different. Also, colour does not appear to work. I fill a vector, colour, with different numbers and check them with> colourto get> [1] 3 2but the colours are always black and red regardless of which numbers I enter. I would be most grateful if someone could enlighten me on how to fix these problems. Thanks, Peter. _______________________________________________________ http://inbox.excite.com -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 7 Sep 2001, Peter Lauren wrote:> I have started using biplot() (with R1.3.0 on Windows) and have become very > frustrated. As far as I can see, I follow the directions but either it > doesn't do what I want it to do, it gives fairly arcane error messages or > both. All I want to do is plot two separate data sets to see how different > they are from each other with respect to two metrics that are represented by > the two axes. > > My first problem is that biplot forms two axes: the bottom and left axes for > the former data set and the top and right axes for the latter set. > Invariably, these axes are scaled differently so it look like the data sets > are easy to distinguish until I realise that they are plotted on different > axes. I try to make all the axes the same by doingI'm not sure, but it sounds to me like you may be trying to use a fairly specialized tool to do something else. You might want to just look into using par(new=TRUE) to draw two plots with different axes on top of each other.> > biplot(former_set, latter_set,xlim <- 0:3,ylim <- 0:3) > > This sets the left and bottom axes to the required range but not the top or > right axis. > > I also do not want the arrow heads, so I enter > > > biplot(former_set, latter_set,arrow.len=0) > > I do not get the arrows but I do get the following error message. > Error in arrows(x0, y0, x1, y1, length = length, angle = angle, code = code, > : > invalid head length > > This depite the fact that the help for biplot says " The arrow head can be > suppressed by `arrow.len = 0'.".This sounds like it may indeed be a bug. (Q to any developers who are reading: would it be a problem to make zero-length arrows give a warning rather than an error?) I can think of two ways to work around it: (1) hack biplot.default to test whether arrow.len equals 0, and only try to draw arrows if not (otherwise segments() might work); (2) set your arrow lengths to some ridiculously small number. >> The program also does not appear to like it when I enter > > > biplot(former_set, latter_set,var.axis=FALSE,colour) > > I get 11 warnings, all saying 'parameter "var.axis" couldn't be set in > high-level plot() function' but the graph does not look any different.Shouldn't that be var.axes ???> Also, colour does not appear to work. I fill a vector, colour, with > different numbers and check them with > > > colour > > to get > > > [1] 3 2 > > but the colours are always black and red regardless of which numbers I > enter.??? How are you specifying this colo(u)r vector to biplot? Are you actually using the col= argument in the function call?> > I would be most grateful if someone could enlighten me on how to fix these > problems. > > Thanks, > Peter. > > > > > > _______________________________________________________ > http://inbox.excite.com > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 7 Sep 2001, Peter Lauren wrote:> I have started using biplot() (with R1.3.0 on Windows) and have become very > frustrated. As far as I can see, I follow the directions but either itMore careful checking might reduce your frustration: several errors are obvious at a glance. Read on ...> doesn't do what I want it to do, it gives fairly arcane error messages or > both. All I want to do is plot two separate data sets to see how different > they are from each other with respect to two metrics that are represented by > the two axes. > > My first problem is that biplot forms two axes: the bottom and left axes for > the former data set and the top and right axes for the latter set. > Invariably, these axes are scaled differently so it look like the data sets > are easy to distinguish until I realise that they are plotted on different > axes. I try to make all the axes the same by doing > > > biplot(former_set, latter_set,xlim <- 0:3,ylim <- 0:3) > > This sets the left and bottom axes to the required range but not the top or > right axis.Um. That's = not <- in there ... and _ is not what I think you intended here. If you read the code you'll see which parameter you have overlooked.> > I also do not want the arrow heads, so I enter > > > biplot(former_set, latter_set,arrow.len=0) > > I do not get the arrows but I do get the following error message. > Error in arrows(x0, y0, x1, y1, length = length, angle = angle, code = code, > : > invalid head length > > This depite the fact that the help for biplot says " The arrow head can be > suppressed by `arrow.len = 0'.".That's out of date, but was true when written. It used to crash some badly-written OSes (like the one you are using). Try a very small number instead.> The program also does not appear to like it when I enter > > > biplot(former_set, latter_set,var.axis=FALSE,colour) > > I get 11 warnings, all saying 'parameter "var.axis" couldn't be set in > high-level plot() function' but the graph does not look any different. > > Also, colour does not appear to work. I fill a vector, colour, with > different numbers and check them with > > > colour > > to get > > > [1] 3 2 > > but the colours are always black and red regardless of which numbers I > enter.There is no argument `colour', is there now? And it's var.axes, not var.axis ....> I would be most grateful if someone could enlighten me on how to fix these > problems.See above. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._