Skip to content

Commit

Permalink
comments on add plots
Browse files Browse the repository at this point in the history
  • Loading branch information
rdboyes committed Mar 23, 2024
1 parent 547e0f9 commit 27560af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/addplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]...),
Expand Down

0 comments on commit 27560af

Please sign in to comment.