[R] biplot
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Fri Sep 7 21:52:47 CEST 2001
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
More 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list