我有所有相同值的情节scale_color_manual.我想避免这种情况,只需调用一次这样的函数:
theme(manual_colors = c("#000000", "#111111"))
可能吗 ?
我认为你可以通过屏蔽来做到这一点scale_colour_discrete:
scale_colour_discrete <- function(...) {
scale_colour_manual(...,values=c("#000000","#111111"))
}
Run Code Online (Sandbox Code Playgroud)