ggplot(all_data,aes(x=dnn,y=rank)) +
geom_point(aes(color=arg,fill=sim,size=pred),shape=21,stroke=2,alpha=0.5)+
scale_color_gradient(low="red",high="green")+
scale_fill_gradient(low="green",high="red")+facet_grid(~quality)
color代表邊框色;fill代表填充色;stroke指定邊框的粗細(xì);shape指定圖例;scale_color_gradient為連續(xù)變量指定顏色的變化范圍;facet_grid代表分塊。

散點(diǎn)圖效果