我试图绘制一个简单的图形,它有 2 组 x 数据(即两条线)。我想更改这两行的默认颜色。我在下面的图表中包含了代码,有人可以帮助解释我应该在哪里插入代码来指定数据的 type1 和 type2 的颜色吗?
ggplot(data = nihss, aes(x=pmri, y=nihss, group=type, color=type)) +
geom_smooth(aes(fill=type)) + geom_point() + theme_classic() +
labs(y="NIHSS at Time of Exam", x="pMRI Hematoma Volume (cc)")+
theme(axis.title = element_text(face = "bold", color="black")) +
theme(text=element_text(size=14)) +
theme(axis.text.y = element_text(face = "bold", color = "black")) +
theme(axis.text.x = element_text(face = "bold", color = "black"))