6

Possible Duplicate:
how to create a plot with customized points in R?

I know in R you can use plot to specify the color of the points

plot(......,col="red") makes the points in a scatter plot, for example, red.

How can I specify the border color of the points such that the border color is different from the fill color.

Community
  • 1
  • 1
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
  • 1
    You can plot twice. Once with a "rim color" and second with the "fill color", but the plotting character should be smaller (`cex`). Hadley does something similar in ggplot2 here: http://had.co.nz/ggplot2/geom_point.html (scroll down towards the end). – Roman Luštrik Jul 18 '12 at 20:24

1 Answers1

13

You can use the bg parameter to handle how a point is filled. On certain types of plotting characters, this will be visible. For example...

plot(1,1,col=3, bg=2, pch=23)
Jeff Allen
  • 17,277
  • 8
  • 49
  • 70