library("dplyr") library("jbkmisc") library("ggplot2") library("ggthemes") library("highcharter") data("diamonds") diamonds <- sample_n(diamonds, 1000) blog_setup()
tt <- "Main Title" st <- "Grumpy wizards make toxic brew for the evil Queen and Jack" xl <- "X lab" yl <- "Y lab" cp <- "jkunst.com" ggplot(diamonds) + geom_point(aes(carat, price), color = "#d35400") + scale_color_gdocs() + labs(title = tt, subtitle = st, caption = cp, x = xl, y = yl) dsdiamonds <- diamonds %>% select(carat, price, cut) %>% mutate(x = carat, y = price) %>% list.parse3() highchart() %>% hc_title(text = tt) %>% hc_subtitle(text = st) %>% hc_add_series(data = dsdiamonds, type = "scatter", showInLegend = FALSE) %>% hc_add_theme(hc_theme_smpl()) %>% hc_xAxis(title = list(text = xl)) %>% hc_yAxis(title = list(text = yl)) %>% hc_add_theme(hc_theme_smpl())
ggplot(diamonds) + geom_point(aes(carat, price, color = cut)) + facet_wrap(~clarity) + ggtitle("A Title") + scale_color_economist()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.