Separate X/Y scales within facet layout #586
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables making plots like this where there are multiple different axes in a facet layout and they may be separate continuous and categorical ones. This works using the existing
scale
id feature, all the scales are kept separately and the plot is built up in one layer per scale id combination.Before, AoG would throw an error if multiple different X or Y scales were detected in the figure. Separate axis labels within a facet plot were possible by using wide input data, but not categorical mixed with continuous as all columns in the wide input data have to belong to the same scale (at least currently).
This PR also adds and exports the
zerolayer
convenience function which can be useful for this scenario and fixes #437