library(ggplot2)
pal1_tntp <- tntp_colors("green", "gold", "orange")
pal2_tntp <- tntp_colors("navy", "cerulean", "sky")
p <- ggplot(mtcars, aes(wt, mpg))
p <- p + geom_point(aes(colour = factor(cyl)))
p
# Change colors to created palette
p <- p + scale_color_manual(values = pal1_tntp)
p
g <- ggplot(mtcars, aes(factor(cyl), mean(mpg)))
g <- g + geom_bar(aes(fill = factor(cyl)), stat = "identity")
g
# Change fill to created palette
g <- g + scale_fill_manual(values = pal2_tntp)
g
Run the code above in your browser using DataLab