[R] custom point shapes

Dieter Menne dieter.menne at menne-biomed.de
Fri Jul 20 12:22:59 CEST 2007

baptiste Auguié <ba208 <at> exeter.ac.uk> writes:

> I'm new to R, but a search through the list didn't quite solve this  
> problem: I want to draw a few ellipses (or any custom shape for that  
> matter) at given locations in a graph. I know how to plot points from  
> my data, set the point type "pch" to any built in value, but I do not  
> know how to specify a custom shape.
> A search for drawing ellipses gave me functions to plot one at a  
> given location, possibly using some dataset but only to display a  
> confidence interval or other convex hull. Nothing to use as pch.
> Say I have this data:
> x<-c(1:10)
> y<-x^2
> I would like to plot (x,y) with some ellipses of custom aspect ratio  
> for every point.

If you want to use pch, you are stuck with the existing symbols, and don't have
much freedom in manipulating these. Looks like you are best off with ellipse in
package car that you probably found already.


More information about the R-help mailing list