我正在使用ggplot绘制散点图并为其添加轮廓线。我确实得到了轮廓线,但它没有填满我的整个数据。
ggplot(training_validation, aes(x=training_mean, y=validation_mean, color = threshold)) +
geom_point() +
scale_color_manual(values=c("red", "gold","gray79","midnightblue")) +
theme( panel.grid.major = element_blank(), panel.grid.minor = element_blank()) +
xlab("Mean Training AUC") +
ylab("Mean Validation AUC") +
stat_density2d(aes(fill=..level..,alpha=..level..), geom='polygon',colour='black') +
scale_fill_continuous(low="green",high="red") +
geom_smooth(method=lm,linetype=2,colour="red",se=F) +
guides(alpha="none")
我希望轮廓线填充整个图。我该怎么办?