-
Notifications
You must be signed in to change notification settings - Fork 638
Figure improvements #369
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
Figure improvements #369
Conversation
…ed swap_axes layout. Instead of brackets, the same color code is used to distinguish groups of genes; otherwise the labels do not fit together with the colorbar. Added option to remove gene names.
…ces. Added examples and the layer parameter. Added tracksplot and rank_genes_groups_tracksplot to api
Wow, this looks great! One remark for future PRs: We’re migrating to a new documentation style using type annotations (see e.g. https://github.com/theislab/scanpy/blob/master/scanpy/tools/louvain.py) could you use that in future PRs, please? (no need to do it in this one) |
This looks amazing! |
@flying-sheep I will be happy to start using the proposed documentation style for future PRs! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job! there’s some duplication going on that should be avoided, otherwise the code looks great and the plots gorgeous!
This is awesome! Thank you, Fidel! 😄 |
edit: moved to #373 |
I took this unrelated discussion to its own issue 😃 |
Together with the suggested changes, I am also updating my usual notebook containing examples of all the plots ( |
@fidelram, I really like your plotting gallery! Would be cool to have that as part of the tutorials or even integrated in the main documentation (enhance each plotting function with an example image?) |
OK, my changes in 426f028 didn’t make the tests break! Do we currently not use the plotting test results? |
Of course, this should become a part of the scanpy tutorials section! That would be awesome! I already asked you for that some time ago. 😉 I'd also start adding calls producing images to the doc pages. Let me build the core infrastructure for having the tutorials run on readthedocs and adding notebooks containing only code to the scanpy main repo. If you want, to shortcut, you can make a PR to scanpy_usage and upload your notebook there. Or, equally well, we simply link to your notebook from the tutorials page. |
Can I merge this, @fidelram and @flying-sheep? |
Green light on my side to merge. |
See my last comment. After fixing the colormaps in this PR, I didn’t update the images, but the tests still pass. What’s up with that? |
@flying-sheep I think that your changes should produce images that are almost equal to the ones on the tests as your changes simply introduce a different way to get the colormap. Btw, what is the advantage of using |
@falexwolf I added a PR for the notebook that I have on the gist to the scanpy_usage (scverse/scanpy_usage#9) |
Thanks for the clarification. Your solution guarantees that the same colors present in let's say .uns['louvain_colors'] will be represented accurately. The previous solution would not have achieve that. |
Thank you again! I'm merging this. Release prior to this is 1.3.4. |
Great! Thanks.
…On Fri, Nov 30, 2018 at 3:23 AM Alex Wolf ***@***.***> wrote:
Merged #369 <#369> into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#369 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEu_1doJSSvm59saaB0TBQ_ix50EbwNfks5u0JaEgaJpZM4YrJn3>
.
|
This PR introduces the following changes:
swap_axes
option was added topl.matrixplot
andpl.heatmap
. Whenswap_axes=True
, the x axis contains cells and the y axis contains genes (Figures related to rankings and heatmap could be transposed. #349).show_genes_labels
topl.heatmap
. This allows to have compact heatmaps without overlapping gene labels.pl.heatmap
.pl.heatmap
by the colors found inadata.uns
layer
option to specify which layer to use for plotting.pl.tracksplot
.if <variable> is True
byif <variable>
after @flying-sheep remarks.setup()
from matplotlib.testingswap_axes=True
As an example, here is how some of the changes look like. I am using the
rank_genes_groups_*
plots because they contain more visual elements. Further examples can be seen here: https://gist.github.com/fidelram/2289b7a8d6da055fb058ac9a79ed485cheatmap with

swap_axes=True, show_gene_labels=False
:matrixplot with
swap_axes=True
:new tracksplot: Each track contains the var (genes) values sorted and colored according to the categories used:

tracksplot using the results of

sc.tl.rank_genes_groups
: