Description Usage Arguments Examples
Change color from categorical colors to diverging/sequential colors
1 2 | draw_scale_manual(method = "", color = cat_colors,
legend_title = "Legend")
|
method |
Which method was used to differ variables in a plot? Two possible value: color or fill. |
color |
Which color group we want to implement? Four possible group: cat_colors,div_colors, seq_colors or other color vector. Default value: cat_colors |
legend_title |
Title of legend. Default value: "Legend" |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
ggplot(mtcars, aes(factor(cyl), wt))+
geom_bar(stat = "identity", fill = cat_colors[1])+
theme_peru()+
draw_scale_numeric("y",0,60)
ggplot(diamonds[1:100,], aes(depth, carat, color = factor(cut)))+
geom_point(size = 7)+
theme_peru("color")+
draw_scale_numeric("y",0,1,0.1,labels_percent = T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.