How to Plot Points with Colored Borders in R
Code
To change the border color or fill out the inner part in the scatter plot, the following options can be modified:
pch
: Change the symbol to fill out the color. Use numbers from 21 to 25.bg
: Stands for background color, determining the color filled inside. In the figure above, it is light green.col
: The color of the symbol itself, which actually refers to the border. In the figure above, it is red.
set.seed(150421)
win.graph(4,4)
plot(rnorm(10), pch=21, bg='green', col='red')