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))