-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Description
In the main Gadfly plot, Stats and Geoms that are not in layers, are both pushed into a layer (which makes sense). This means the statistics field of the main plot (p1.statistics below) is actually obsolete.
p1 = plot(Stat.smooth, Geom.ribbon)
p1.statistics # StatisticElement[]
p1.layers[1].statistics # StatisticElement[Stat.smooth()]
p1.layers[1].geom # Geom.ribbon() Geom.subplot_grid has similar fields to the main plot. In subplot_grid Geoms that are not in layers get pushed to a layer,
but Stats get pushed to the statistics field of subplot_grid (p2.statistics below). This is problematic,
because the Stat and Geom don't have a clear association (this is worse when attempting to use multiple Stats/Geoms).
p2 = Geom.subplot_grid(Stat.smooth, Geom.ribbon)
p2.statistics # StatisticElement[Stat.smooth()]
p2.layers[1].statistics # StatisticElement[]
p2.layers[1].geom # Geom.ribbon()The decoupling of the Stat/Geom makes it makes it unclear what the purpose of p2.statistics is, leading to bad coding.
tlnagy
Metadata
Metadata
Assignees
Labels
No labels