Email icon An envelope. It indicates the ability to send an email.
Colors in R
In R, colors can be specified either by name (e.g col = “red”) or as a hexadecimal RGB triplet (such as col = “#FFCC00”). You can also use other color systems such as ones taken from the RColorBrewer package.
We will use the following custom R function to generate a plot of color names available in R :
# Generate a plot of color names which R knows about. #++++++++++++++++++++++++++++++++++++++++++++ # cl : a vector of colors to plots # bg: background of the plot # rot: text rotation angle #usage=showCols(bg="gray33") showCols
The names of the first sixty colors are shown in the following chart :
# The first sixty color names showCols(bg="gray20",cl=colors()[1:60], rot=30, cex=0.9) # Barplot using color names barplot(c(2,5), col=c("chartreuse", "blue4"))
To view all the built-in color names which R knows about (n = 657), use the following R code :
showCols(cl= colors(), bg="gray33", rot=30, cex=0.75)
Specifying colors by hexadecimal code
Colors can be specified using hexadecimal color code, such as “#FFC00”
# Barplot using hexadecimal color code barplot(c(2,5), col=c("#009999", "#0000FF"))
Using RColorBrewer palettes
You have to install the RColorBrewer package as follow :
install.packages("RColorBrewer")
RColorBrewer package create a nice looking color palettes.
The color palettes associated to RColorBrewer package can be drawn using display.brewer.all() R function as follow :
library("RColorBrewer") display.brewer.all()
There are 3 types of palettes : sequential, diverging, and qualitative.
- Sequential palettes are suited to ordered data that progress from low to high (gradient). The palettes names are : Blues, BuGn, BuPu, GnBu, Greens, Greys, Oranges, OrRd, PuBu, PuBuGn, PuRd, Purples, RdPu, Reds, YlGn, YlGnBu YlOrBr, YlOrRd.
- Diverging palettes put equal emphasis on mid-range critical values and extremes at both ends of the data range. The diverging palettes are : BrBG, PiYG, PRGn, PuOr, RdBu, RdGy, RdYlBu, RdYlGn, Spectral
- Qualitative palettes are best suited to representing nominal or categorical data. They not imply magnitude differences between groups. The palettes names are : Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3
You can also view a single RColorBrewer palette by specifying its name as follow :
# View a single RColorBrewer palette by specifying its name display.brewer.pal(n = 8, name = 'RdBu')
# Hexadecimal color specification brewer.pal(n = 8, name = "RdBu")
## [1] "#B2182B" "#D6604D" "#F4A582" "#FDDBC7" "#D1E5F0" "#92C5DE" "#4393C3" "#2166AC"
# Barplot using RColorBrewer barplot(c(2,5,7), col=brewer.pal(n = 3, name = "RdBu"))
The surprise song dress in yellow
Each night during the Eras Tour, Taylor Swift performs an acoustic set with two surprise songs.
The dress for this segment is designed for a quick change; Swift slips it over the “1989” outfit while still on stage. It makes sense for the dress to be plain. But it doesn’t make sense for the fabric to be the same color as Big Bird.
Frankly, the yellow dress is ugly. It’s way too yellow.
The surprise song dress in green
The green dress isn’t ugly, but it’s not especially stunning either.
Advertisement
Advertisement
The pink dress still isn’t anything to write home about, but generally speaking, Swift looks good in pink.
Advertisement
Advertisement
This is the best surprise song dress, purely because it reminds me of Sharpay Evans singing “Bop to the Top.”
Advertisement
Advertisement
The flowers plopped all over this dress are flimsy and unpleasant-looking. I would be glad to never see it again.
Honestly, Swift’s outfits never slay during the “Red” segment, but the ombre romper is the worst offender. It’s not terrible, but it doesn’t do anything for her.
Advertisement
Advertisement
The “All Too Well” jacket
Swift dons glittery, floor-grazing outerwear to perform “All Too Well (10 Minute Version),” which helps make the “Red” segment a bit more sophisticated — though it doesn’t match the somber vibe of the song. I much preferred the sleek look that Swift wore to perform the song on “Saturday Night Live.”
Advertisement
Advertisement