ggplot(compare, aes(x=specificity, y=false_positives)) + geom_jitter(height=.02, color=specificity) + scale_discrete_manual(values=c("#999999", "#E69F00", "#56B4E9", "violet"))
manual_scale中的错误(外观、值、中断等):缺少参数“aesthetics”,无默认值
2w2cym1i1#
像这样?
library(tidyverse) ggplot(df, aes(x=specificity, y=false_positives, color= factor(specificity))) + geom_point(position = position_jitter()) + scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9", "#8800FF")) + theme_bw()
数据:
df <- structure(list(specificity = c(0.9, 0.87, 0.89, 0.91), false_positives = c(0.4, 0.3, 0.4, 0.4)), row.names = c("Logistic", "Probit", "KNN", "Naive" ), class = "data.frame")
1条答案
按热度按时间2w2cym1i1#
像这样?
数据: