AlgebraOfGraphics.jl vs. GGPlot.jl

CC-by-SA Pumas.ai |β€”|β€”|β€”| ||ggplot2 |AoG.jl |Input data |ggplot(df) | data(df) |Map aesthetics |aes(…) |mapping(…) |Add geometries |geom_(…) |visual(…) |Combine layers | + | |Facetting |facet_wrap|grid |mapping(…; [row|col|layout]=:column) |Customize scales |scale_manual() | renamer(…) |Themes theme(…) |set_theme!(theme_*()); |draw(plt) |Customize axes labels |[x|y]lab(β€œβ€¦β€) |draw(plt, axis=(; [x|y]label=β€œβ€¦β€)) |Customize color |scale_[fill|color]_*(…) |draw(plt, palettes=(; color=…)) or visual(…, colormap=β€¦β€œ) |Save plot |ggsave(”file.[png|svg]β€œ) |save(”file.[png|svg]β€œ, draw(plt)) |Frequency |geom_bar() or stat_count() |frequency() |Histogram |geom_histogram or stat_bin() |histogram() |Density |geom_density or stat_density() |density() |Expectation/Mean| stat_summary(fun =”mean”) |expectation() |Smooth trend |stat_smooth or geom_smooth() |(visual(…) + smooth()) |Linear trend |stat_smooth(method = β€œlm”) or geom_smooth(method = β€œlm”)| (visual(…) + linear()) |Log scale |scale_[x|y]_log10() |draw(plt; axis=(; [x|y]scale=log10))