knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ggplot2) library(fhiplot)
q <- ggplot(diamonds[1:200,], aes(carat, depth, color = cut)) q <- q + geom_point(size = 4) q <- q + fhiplot::scale_color_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_basic'") q <- q + fhiplot::theme_fhi_basic() q
q <- ggplot(diamonds[1:200,], aes(carat, depth, color = cut)) q <- q + geom_point(size = 4) q <- q + fhiplot::scale_color_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_lines'") q <- q + fhiplot::theme_fhi_lines() q
q <- ggplot(diamonds[1:200,], aes(carat, depth, color = cut)) q <- q + geom_point(size = 4) q <- q + fhiplot::scale_color_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_lines_horizontal'") q <- q + fhiplot::theme_fhi_lines_horizontal() q
We first try some barcharts with the dis_primary
palette and two different themes:
q <- ggplot(diamonds, aes(x=color, fill = cut)) q <- q + geom_bar() q <- q + fhiplot::scale_fill_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_basic'") q <- q + fhiplot::theme_fhi_basic() q
q <- ggplot(diamonds, aes(x=color, fill = cut)) q <- q + geom_bar() q <- q + fhiplot::scale_fill_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_lines'") q <- q + fhiplot::theme_fhi_lines() q
q <- ggplot(diamonds, aes(x=color, fill = cut)) q <- q + geom_bar() q <- q + fhiplot::scale_fill_fhi(palette = "primary") q <- q + labs(title="Theme: 'theme_fhi_lines_horizontal'") q <- q + fhiplot::theme_fhi_lines_horizontal() q
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.