【发布时间】:2012-09-02 02:28:51
【问题描述】:
我正在使用scale_colour_manual 指定我需要的可能颜色。但是,如果我选择red,我会得到令人眼花缭乱的红色,而不是如果我首先不使用scale_colour_manual 会出现的较温和的ggplot2 默认红色。访问 ggplot2 默认调色板的标签或常量是什么?
ggplot(data=df, aes(x=n, y=rt, group=kernel, shape=kernel, colour=kernel)) +
geom_point(fill="white", size=3) + geom_line() + xlab("n") + ylab("Runtime (s)") +
opts(title=title,plot.title=theme_text(size=font.size)) +
scale_colour_manual(values=c("grey30", "red")) +
opts(legend.position = c(x_shift,0.87),legend.background=theme_rect(fill = "transparent",colour=NA))
请注意,使用“red30”是行不通的,它只适用于灰色,原因我不知道。
【问题讨论】:
-
试试“salmon”而不是“red”。