From 27560af07600d06fed50c8a65b463b4f11a6bf95 Mon Sep 17 00:00:00 2001 From: Randy Boyes Date: Sat, 23 Mar 2024 12:01:42 -0400 Subject: [PATCH] comments on add plots --- src/addplots.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addplots.jl b/src/addplots.jl index 6f5d170..e185c9d 100644 --- a/src/addplots.jl +++ b/src/addplots.jl @@ -17,13 +17,13 @@ function Base.:+(x::GGPlot, y...)::GGPlot end result = GGPlot( - vcat(x.geoms, + vcat(x.geoms, # if there are geoms or lists of geoms, append them to the ggplot's geoms [i for i in y if i isa Geom], [i for i in y if i isa Vector{Geom}]...), - merge(x.default_aes, + merge(x.default_aes, # if there are aes specs, make them the ggplot's defaults [i.aes for i in y if i isa Aesthetics]...), - x.data, - merge(x.axis_options, + x.data, # the default data is passed on to the final ggplot + merge(x.axis_options, # get any axis options out of the geoms into one location [i.axis_options for i in y if i isa Geom]..., [get_options(i) for i in y if i isa Vector{Geom}]..., [i.opt for i in y if i isa AxisOptions]...),