R 我想建立这两个几何点()的图例
我需要一个图例,以便看到绿色和蓝色涂鸦与一些文字之间的区别R 我想建立这两个几何点()的图例,r,ggplot2,R,Ggplot2,我需要一个图例,以便看到绿色和蓝色涂鸦与一些文字之间的区别 scatter_figure_blade <- ggplot() + theme_bw() + theme(plot.title = element_text(size = 12, face = "bold", hjust = 0.5)) + geom_point(data=rp_16_8, aes(x=r_16_8, y=p_16_8), colour = "green"
scatter_figure_blade <- ggplot() +
theme_bw() +
theme(plot.title = element_text(size = 12, face = "bold", hjust = 0.5)) +
geom_point(data=rp_16_8, aes(x=r_16_8, y=p_16_8), colour = "green", size = 3) +
geom_point(data=rp_8_16, aes(x=r_8_16, y=p_8_16), colour = "blue", size = 3) +
scale_color_manual(name = "Deployments" (?)) +
labs(x = bquote("Reliability" ~ (1 - P[f])), y = "Power Consumption (W)", title = "Google Traces")
scatter\u figure\u blade我已经找到了一个简单的解决方案
scatter_figure_blade <- ggplot() +
theme_bw() +
theme(plot.title = element_text(size = 12, face = "bold", hjust = 0.5)) +
geom_point(data=rp_16_8, aes(x=r_16_8, y=p_16_8, color = "#2778d8"), size = 3) +
geom_point(data=rp_8_16, aes(x=r_8_16, y=p_8_16, color = "#bb8fce"), size = 3) +
labs(x = bquote("Reliability" ~ (1 - P[f])),
y = "Power Consumption (W)",
title = "Google Traces",
color = "Deployment") +
scale_color_manual(values = c("#2778d8", "#bb8fce"),
labels = c("16x8", "8x16"))
scatter\u figure\u从问题中读取: