R图:在彩色点周围使用黑色边框

时间:2015-07-17 15:13:20

标签: r

我有一些数据,我必须绘制为彩色点,我想在点周围有一个黑色边框。 这是代码:

plot(x, y, pch=c(rep(16, 6), rep(17, 6)), cex=1.3, col=my_colors)

这会生成没有边框的彩色点...如何添加黑色边框?

1 个答案:

答案 0 :(得分:1)

使用实心的填充绘图字符instread。

x<-1:6
y<-1:6
my_colors <- rainbow(6)

plot(x, y, pch=c(rep(22, 3), rep(23, 3)), cex=1.3, bg=my_colors)

enter image description here

相关问题