Draft
Conversation
This enables us to correctly sort the features in each plot. Requires plotnine 0.16.
this enables us to have different X axis limits for each view, which is useful when plotting multiple views with different numbers of features
The caption set with plot_annotation had inconsistent distance to the plot (particularly in pl.weights) and seems to ignore a lot of element_text properties. Instead, put an X axis label on each plot in the bottom row. This is consistent with the Y axis labels, but results in inconsistency in pl.weights between grid mode (when nrow = ncol = None) and wrapping mode: grid mode uses faceting for each row and only shows the X axis label once in the middle.
c1fb9d4 to
0c29e28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With plotnine 0.16, plot composition is sufficiently advanced for our usecase. We can use it instead of faceting to fix two issues:
pl.top_weightscan now properly sort the features on the Y axis for each plotpl.weightscan now handle views with different numbers of features: Each view gets its own X axis, instead of forcing the same X axis on all views, which resulted in views with few features not using the plot space efficiently