library(tidyverse) ## for pretty much everything... library(magick) ## I'm now a magick fan!!! library(scales) ## Handy when it comes to scaling, but I also love show_col function library(patchwork) ## put ggplot side by side easily :) ## Let's just set some of my favourite number. phi <- (1 + sqrt(5)) / 2 golden_angle <- pi*(3-sqrt(5))Function To Draw Artwork Instead of creating data frame, then plot with ...
## Pie Chart coffee_long %>% ggplot() + geom_bar(aes(x=sqrt(total.amount)/2, y = amount, fill=fct_rev(ingredient.f), width=sqrt(total.amount)), stat="identity", position="fill") + facet_wrap(~name2, ncol=4) + geom_text(aes(x=sqrt(total.amount), y=Inf, label=""), size=7) + theme_void(base_family="Roboto Condensed") + coord_polar(theta="y") + scale_fill_hue(name="Ingredient", l=80) + theme(legend.position="top")Espresso Drinks Visualized with ggplot2 Bar Chart
## Bar Chart coffee_long %>% ggplot() + geom_bar(aes(x=3, y = amount, fill=fct_rev(ingredient.f), width=sqrt(total.amount)/2), stat="identity", position="stack") + facet_wrap(~name2, ncol=4) + theme_void(base_family="Roboto Condensed") + scale_fill_hue(name="Ingredient", l=80) + theme(legend.position="top")
Copyright © 2022 | MH Corporate basic by MH Themes