带有彩色边框但没有填充的ggplot2

Mdh*_*ale 2 r ggplot2

我正在尝试使用库绘制点图ggplot2.我的脚本为下面的示例数据生成一个点图,但我要求点边框着色,但点的其余部分应为空(无填充).例如,如果我的点是红色,蓝色和绿色,我只想让点边框为红色,蓝色和绿色,而点的其余部分应为空.

以下是我当前的脚本和示例数据

library(ggplot2)      
File2=read.table("PB12_combo.txt", header=T, sep="\t")    
ggplot(File2, aes(x_axis, y_axis, colour=factor(z_axis)))+geom_point(size=5)

     x_axis  y_axis  z_axis
       605     250     2
       690     394     2
       762     109     2
       543     495     2
       388     538     2
       758     736     2
       197     409     2
       390     106     3
       390     343     4
Run Code Online (Sandbox Code Playgroud)

Did*_*rts 6

将点的形状更改为1

ggplot(File2, aes(x_axis, y_axis, colour=factor(z_axis)))+geom_point(size=5,shape=1)
Run Code Online (Sandbox Code Playgroud)