---
title: "Día 10 #30díasdegráficos. Paletas de colores"
author: "Rubén F. Bustillo"
output:
flexdashboard::flex_dashboard:
source_code: embed
orientation: columns
vertical_layout: fill
theme: yeti
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(gapminder)
############################################################################################
# I got the list of colours from: http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf
############################################################################################
gapminder <- gapminder::gapminder
grafico <- gapminder %>%
filter(year == 2007) %>%
group_by(continent) %>%
summarise(promedio = mean(lifeExp))
```
Hoja 1. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### antiquewhite
```{r}
plot <- ggplot(grafico, aes(x = continent, y = promedio, fill = continent)) +
geom_col() +
labs(y = "Life expectancy (mean)") +
theme_classic() +
guides(fill = FALSE)
plot +
labs(title = "color: antiquewhite (1-4)") +
scale_fill_manual(values = c("antiquewhite", "antiquewhite1", "antiquewhite2", "antiquewhite3", "antiquewhite4"))
```
### aquamarine
```{r}
plot +
labs(title = "color: aquamarine (1-4)") +
scale_fill_manual(values = c("aquamarine", "aquamarine1", "aquamarine2", "aquamarine3", "aquamarine4"))
```
Column
-----------------------------------------------------------------------
### azure
```{r}
plot +
labs(title = "color: azure (1-4)") +
scale_fill_manual(values = c("azure", "azure1", "azure2", "azure3", "azure4"))
```
### bisque
```{r}
plot +
labs(title = "color: bisque (1-4)") +
scale_fill_manual(values = c("bisque", "bisque1", "bisque2", "bisque3", "bisque4"))
```
Column
-----------------------------------------------------------------------
### blue
```{r}
plot +
labs(title = "color: blue (1-4)") +
scale_fill_manual(values = c("blue", "blue1", "blue2", "blue3", "blue4"))
```
### brown
```{r}
plot +
labs(title = "color: brown (1-4)") +
scale_fill_manual(values = c("brown", "brown1", "brown2", "brown3", "brown4"))
```
Hoja 2. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### burlywood
```{r}
plot +
labs(title = "color: burlywood (1-4)") +
scale_fill_manual(values = c("burlywood", "burlywood1", "burlywood2", "burlywood3", "burlywood4"))
```
### cadetblue
```{r}
plot +
labs(title = "color: cadetblue (1-4)") +
scale_fill_manual(values = c("cadetblue", "cadetblue1", "cadetblue2", "cadetblue3", "cadetblue4"))
```
Column
-----------------------------------------------------------------------
### chartreuse
```{r}
plot +
labs(title = "color: chartreuse (1-4)") +
scale_fill_manual(values = c("chartreuse", "chartreuse1", "chartreuse2", "chartreuse3", "chartreuse4"))
```
### chocolate
```{r}
plot +
labs(title = "color: chocolate (1-4)") +
scale_fill_manual(values = c("chocolate", "chocolate1", "chocolate2", "chocolate3", "chocolate4"))
```
Column
-----------------------------------------------------------------------
### coral
```{r}
plot +
labs(title = "color: coral (1-4)") +
scale_fill_manual(values = c("coral", "coral1", "coral2", "coral3", "coral4"))
```
### cornsilk
```{r}
plot +
labs(title = "color: cornsilk (1-4)") +
scale_fill_manual(values = c("cornsilk", "cornsilk1", "cornsilk2", "cornsilk3", "cornsilk4"))
```
Hoja 3. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### cyan
```{r}
plot +
labs(title = "color: cyan (1-4)") +
scale_fill_manual(values = c("cyan", "cyan1", "cyan2", "cyan3", "cyan4"))
```
### darkgoldenrod
```{r}
plot +
labs(title = "color: darkgoldenrod (1-4)") +
scale_fill_manual(values = c("darkgoldenrod", "darkgoldenrod1", "darkgoldenrod2", "darkgoldenrod3", "darkgoldenrod4"))
```
Column
-----------------------------------------------------------------------
### darkolivegreen
```{r}
plot +
labs(title = "color: darkolivegreen (1-4)") +
scale_fill_manual(values = c("darkolivegreen", "darkolivegreen1", "darkolivegreen2", "darkolivegreen3", "darkolivegreen4"))
```
### darkorange
```{r}
plot +
labs(title = "color: darkorange (1-4)") +
scale_fill_manual(values = c("darkorange", "darkorange1", "darkorange2", "darkorange3", "darkorange4"))
```
Column
-----------------------------------------------------------------------
### darkorchid
```{r}
plot +
labs(title = "color: darkorchid (1-4)") +
scale_fill_manual(values = c("darkorchid", "darkorchid1", "darkorchid2", "darkorchid3", "darkorchid4"))
```
### darkseagreen
```{r}
plot +
labs(title = "color: darkseagreen (1-4)") +
scale_fill_manual(values = c("darkseagreen", "darkseagreen1", "darkseagreen2", "darkseagreen3", "darkseagreen4"))
```
Hoja 4. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### darkslategray
```{r}
plot +
labs(title = "color: darkslategray (1-4)") +
scale_fill_manual(values = c("darkslategray", "darkslategray1", "darkslategray2", "darkslategray3", "darkslategray4"))
```
### deeppink
```{r}
plot +
labs(title = "color: deeppink (1-4)") +
scale_fill_manual(values = c("deeppink", "deeppink1", "deeppink2", "deeppink3", "deeppink4"))
```
Column
-----------------------------------------------------------------------
### deepskyblue
```{r}
plot +
labs(title = "color: deepskyblue (1-4)") +
scale_fill_manual(values = c("deepskyblue", "deepskyblue1", "deepskyblue2", "deepskyblue3", "deepskyblue4"))
```
### dodgerblue
```{r}
plot +
labs(title = "color: dodgerblue (1-4)") +
scale_fill_manual(values = c("dodgerblue", "dodgerblue1", "dodgerblue2", "dodgerblue3", "dodgerblue4"))
```
Column
-----------------------------------------------------------------------
### firebrick
```{r}
plot +
labs(title = "color: firebrick (1-4)") +
scale_fill_manual(values = c("firebrick", "firebrick1", "firebrick2", "firebrick3", "firebrick4"))
```
### gold
```{r}
plot +
labs(title = "color: gold (1-4)") +
scale_fill_manual(values = c("gold", "gold1", "gold2", "gold3", "gold4"))
```
Hoja 5. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### goldenrod
```{r}
plot +
labs(title = "color: goldenrod (1-4)") +
scale_fill_manual(values = c("goldenrod", "goldenrod1", "goldenrod2", "goldenrod3", "goldenrod4"))
```
### green
```{r}
plot +
labs(title = "color: green (1-4)") +
scale_fill_manual(values = c("green", "green1", "green2", "green3", "green4"))
```
Column
-----------------------------------------------------------------------
### honeydew
```{r}
plot +
labs(title = "color: honeydew (1-4)") +
scale_fill_manual(values = c("honeydew", "honeydew1", "honeydew2", "honeydew3", "honeydew4"))
```
### hotpink
```{r}
plot +
labs(title = "color: hotpink (1-4)") +
scale_fill_manual(values = c("hotpink", "hotpink1", "hotpink2", "hotpink3", "hotpink4"))
```
Column
-----------------------------------------------------------------------
### indianred
```{r}
plot +
labs(title = "color: indianred (1-4)") +
scale_fill_manual(values = c("indianred", "indianred1", "indianred2", "indianred3", "indianred4"))
```
### ivory
```{r}
plot +
labs(title = "color: ivory (1-4)") +
scale_fill_manual(values = c("ivory", "ivory1", "ivory2", "ivory3", "ivory4"))
```
Hoja 6. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### khaki
```{r}
plot +
labs(title = "color: khaki (1-4)") +
scale_fill_manual(values = c("khaki", "khaki1", "khaki2", "khaki3", "khaki4"))
```
### lavenderblush
```{r}
plot +
labs(title = "color: lavenderblush (1-4)") +
scale_fill_manual(values = c("lavenderblush", "lavenderblush1", "lavenderblush2", "lavenderblush3", "lavenderblush4"))
```
Column
-----------------------------------------------------------------------
### lemonchiffon
```{r}
plot +
labs(title = "color: lemonchiffon (1-4)") +
scale_fill_manual(values = c("lemonchiffon", "lemonchiffon1", "lemonchiffon2", "lemonchiffon3", "lemonchiffon4"))
```
### lightblue
```{r}
plot +
labs(title = "color: lightblue (1-4)") +
scale_fill_manual(values = c("lightblue", "lightblue1", "lightblue2", "lightblue3", "lightblue4"))
```
Column
-----------------------------------------------------------------------
### lightcyan
```{r}
plot +
labs(title = "color: lightcyan (1-4)") +
scale_fill_manual(values = c("lightcyan", "lightcyan1", "lightcyan2", "lightcyan3", "lightcyan4"))
```
### lightgoldenrod
```{r}
plot +
labs(title = "color: lightgoldenrod (1-4)") +
scale_fill_manual(values = c("lightgoldenrod", "lightgoldenrod1", "lightgoldenrod2", "lightgoldenrod3", "lightgoldenrod4"))
```
Hoja 7. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### lightpink
```{r}
plot +
labs(title = "color: lightpink (1-4)") +
scale_fill_manual(values = c("lightpink", "lightpink1", "lightpink2", "lightpink3", "lightpink4"))
```
### lightsalmon
```{r}
plot +
labs(title = "color: lightsalmon (1-4)") +
scale_fill_manual(values = c("lightsalmon", "lightsalmon1", "lightsalmon2", "lightsalmon3", "lightsalmon4"))
```
Column
-----------------------------------------------------------------------
### lightskyblue
```{r}
plot +
labs(title = "color: lightskyblue (1-4)") +
scale_fill_manual(values = c("lightskyblue", "lightskyblue1", "lightskyblue2", "lightskyblue3", "lightskyblue4"))
```
### lightslateblue
```{r}
plot +
labs(title = "color: lightsteelblue (1-4)") +
scale_fill_manual(values = c("lightsteelblue", "lightsteelblue1", "lightsteelblue2", "lightsteelblue3", "lightsteelblue4"))
```
Column
-----------------------------------------------------------------------
### lightyellow
```{r}
plot +
labs(title = "color: lightyellow (1-4)") +
scale_fill_manual(values = c("lightyellow", "lightyellow1", "lightyellow2", "lightyellow3", "lightyellow4"))
```
### magenta
```{r}
plot +
labs(title = "color: magenta (1-4)") +
scale_fill_manual(values = c("magenta", "magenta1", "magenta2", "magenta3", "magenta4"))
```
Hoja 8. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### maroon
```{r}
plot +
labs(title = "color: maroon (1-4)") +
scale_fill_manual(values = c("maroon", "maroon1", "maroon2", "maroon3", "maroon4"))
```
### mediumorchid
```{r}
plot +
labs(title = "color: mediumorchid (1-4)") +
scale_fill_manual(values = c("mediumorchid", "mediumorchid1", "mediumorchid2", "mediumorchid3", "mediumorchid4"))
```
Column
-----------------------------------------------------------------------
### mediumpurple
```{r}
plot +
labs(title = "color: mediumpurple (1-4)") +
scale_fill_manual(values = c("mediumpurple", "mediumpurple1", "mediumpurple2", "mediumpurple3", "mediumpurple4"))
```
### mistyrose
```{r}
plot +
labs(title = "color: mistyrose (1-4)") +
scale_fill_manual(values = c("mistyrose", "mistyrose1", "mistyrose2", "mistyrose3", "mistyrose4"))
```
Column
-----------------------------------------------------------------------
### navajowhite
```{r}
plot +
labs(title = "color: navajowhite (1-4)") +
scale_fill_manual(values = c("navajowhite", "navajowhite1", "navajowhite2", "navajowhite3", "navajowhite4"))
```
### olivedrab
```{r}
plot +
labs(title = "color: olivedrab (1-4)") +
scale_fill_manual(values = c("olivedrab", "olivedrab1", "olivedrab2", "olivedrab3", "olivedrab4"))
```
Hoja 9. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### orange
```{r}
plot +
labs(title = "color: orange (1-4)") +
scale_fill_manual(values = c("orange", "orange1", "orange2", "orange3", "orange4"))
```
### orangered
```{r}
plot +
labs(title = "color: orangered (1-4)") +
scale_fill_manual(values = c("orangered", "orangered1", "orangered2", "orangered3", "orangered4"))
```
Column
-----------------------------------------------------------------------
### orchid
```{r}
plot +
labs(title = "color: orchid (1-4)") +
scale_fill_manual(values = c("orchid", "orchid1", "orchid2", "orchid3", "orchid4"))
```
### palegreen
```{r}
plot +
labs(title = "color: palegreen (1-4)") +
scale_fill_manual(values = c("palegreen", "palegreen1", "palegreen2", "palegreen3", "palegreen4"))
```
Column
-----------------------------------------------------------------------
### paleturquoise
```{r}
plot +
labs(title = "color: paleturquoise (1-4)") +
scale_fill_manual(values = c("paleturquoise", "paleturquoise1", "paleturquoise2", "paleturquoise3", "paleturquoise4"))
```
### palevioletred
```{r}
plot +
labs(title = "color: palevioletred (1-4)") +
scale_fill_manual(values = c("palevioletred", "palevioletred1", "palevioletred2", "palevioletred3", "palevioletred4"))
```
Hoja 10. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### peachpuff
```{r}
plot +
labs(title = "color: peachpuff (1-4)") +
scale_fill_manual(values = c("peachpuff", "peachpuff1", "peachpuff2", "peachpuff3", "peachpuff4"))
```
### pink
```{r}
plot +
labs(title = "color: pink (1-4)") +
scale_fill_manual(values = c("pink", "pink1", "pink2", "pink3", "pink4"))
```
Column
-----------------------------------------------------------------------
### plum
```{r}
plot +
labs(title = "color: plum (1-4)") +
scale_fill_manual(values = c("plum", "plum1", "plum2", "plum3", "plum4"))
```
### purple
```{r}
plot +
labs(title = "color: purple (1-4)") +
scale_fill_manual(values = c("purple", "purple1", "purple2", "purple3", "purple4"))
```
Column
-----------------------------------------------------------------------
### red
```{r}
plot +
labs(title = "color: red (1-4)") +
scale_fill_manual(values = c("red", "red1", "red2", "red3", "red4"))
```
### rosybrown
```{r}
plot +
labs(title = "color: rosybrown (1-4)") +
scale_fill_manual(values = c("rosybrown", "rosybrown1", "rosybrown2", "rosybrown3", "rosybrown4"))
```
Hoja 11. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### royalblue
```{r}
plot +
labs(title = "color: royalblue (1-4)") +
scale_fill_manual(values = c("royalblue", "royalblue1", "royalblue2", "royalblue3", "royalblue4"))
```
### salmon
```{r}
plot +
labs(title = "color: salmon (1-4)") +
scale_fill_manual(values = c("salmon", "salmon1", "salmon2", "salmon3", "salmon4"))
```
Column
-----------------------------------------------------------------------
### seagreen
```{r}
plot +
labs(title = "color: seagreen (1-4)") +
scale_fill_manual(values = c("seagreen", "seagreen1", "seagreen2", "seagreen3", "seagreen4"))
```
### seashell
```{r}
plot +
labs(title = "color: seashell (1-4)") +
scale_fill_manual(values = c("seashell", "seashell1", "seashell2", "seashell3", "seashell4"))
```
Column
-----------------------------------------------------------------------
### sienna
```{r}
plot +
labs(title = "color: sienna (1-4)") +
scale_fill_manual(values = c("sienna", "sienna1", "sienna2", "sienna3", "sienna4"))
```
### skyblue
```{r}
plot +
labs(title = "color: skyblue (1-4)") +
scale_fill_manual(values = c("skyblue", "skyblue1", "skyblue2", "skyblue3", "skyblue4"))
```
Hoja 12. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### slateblue
```{r}
plot +
labs(title = "color: slateblue (1-4)") +
scale_fill_manual(values = c("slateblue", "slateblue1", "slateblue2", "slateblue3", "slateblue4"))
```
### slategray
```{r}
plot +
labs(title = "color: slategray (1-4)") +
scale_fill_manual(values = c("slategray", "slategray1", "slategray2", "slategray3", "slategray4"))
```
Column
-----------------------------------------------------------------------
### snow
```{r}
plot +
labs(title = "color: snow (1-4)") +
scale_fill_manual(values = c("snow", "snow1", "snow2", "snow3", "snow4"))
```
### springgreen
```{r}
plot +
labs(title = "color: springgreen (1-4)") +
scale_fill_manual(values = c("springgreen", "springgreen1", "springgreen2", "springgreen3", "springgreen4"))
```
Column
-----------------------------------------------------------------------
### steelblue
```{r}
plot +
labs(title = "color: steelblue (1-4)") +
scale_fill_manual(values = c("steelblue", "steelblue1", "steelblue2", "steelblue3", "steelblue4"))
```
### tan
```{r}
plot +
labs(title = "color: tan (1-4)") +
scale_fill_manual(values = c("tan", "tan1", "tan2", "tan3", "tan4"))
```
Hoja 13. {data-navmenu="Colours"}
==================================================================
Column
-----------------------------------------------------------------------
### thistle
```{r}
plot +
labs(title = "color: thistle (1-4)") +
scale_fill_manual(values = c("thistle", "thistle1", "thistle2", "thistle3", "thistle4"))
```
### tomato
```{r}
plot +
labs(title = "color: tomato (1-4)") +
scale_fill_manual(values = c("tomato", "tomato1", "tomato2", "tomato3", "tomato4"))
```
Column
-----------------------------------------------------------------------
### turquoise
```{r}
plot +
labs(title = "color: turquoise (1-4)") +
scale_fill_manual(values = c("turquoise", "turquoise1", "turquoise2", "turquoise3", "turquoise4"))
```
### violetred
```{r}
plot +
labs(title = "color: violetred (1-4)") +
scale_fill_manual(values = c("violetred", "violetred1", "violetred2", "violetred3", "violetred4"))
```
Column
-----------------------------------------------------------------------
### wheat
```{r}
plot +
labs(title = "color: wheat (1-4)") +
scale_fill_manual(values = c("wheat", "wheat1", "wheat2", "wheat3", "wheat4"))
```
### yellow
```{r}
plot +
labs(title = "color:yellow (1-4)") +
scale_fill_manual(values = c("yellow", "yellow1", "yellow2", "yellow3", "yellow4"))
```