Skip to content

weight plotting fixes#174

Draft
ilia-kats wants to merge 3 commits intomainfrom
plot_composition
Draft

weight plotting fixes#174
ilia-kats wants to merge 3 commits intomainfrom
plot_composition

Conversation

@ilia-kats
Copy link
Copy Markdown
Collaborator

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_weights can now properly sort the features on the Y axis for each plot
  • pl.weights can 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

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.
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.

1 participant