Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plot layers & inner subplot layers consistent #1520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mattriks
Copy link
Member

  • I've run the regression tests
  • I've built the docs and confirmed these changes don't cause new errors

This PR:

  • makes the layer.statistics field of plot(layer(...)) and the inner layers of Geom.subplot_grid() consistent (fixes Stats in Geom.subplot_grid #1516)
  • updates Stat.violin as needed
  • an open question from this PR is what should be in the layer.statistics field of the outer layer of layer(Geom.subplot_grid(layer(...))). Note that this should not necessarily be the same as
    the statistics field of the inner layers, which are clearly defined by this PR.
    E.g. the outer layer of Geom.subplot_grid could contain statistics which modify aesthetics such as :xgroup and :ygroup, but
    no such statistics have been developed yet for Gadfly.

Example

(now p2 shows same behaviour as p1 from OP in #1516):

p2 = Geom.subplot_grid(Stat.smooth, Geom.ribbon)
p2.statistics   # StatisticELement[]
p2.layers[1].statistics # StatisticElement[Stat.smooth()]
  • Note in this PR, the fields p1.statistics and p2.statistics have not been deprecated, because they may be useful for developers.

@Mattriks
Copy link
Member Author

Regression testing showed 1 difference: testscripts/auto_enumerate.jl shows Geom.line layer but no Geom.bar. Will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stats in Geom.subplot_grid
1 participant