Repository navigation
Dict param to plots #646 - #661
Conversation
…tacked_violin and tracksplot. Added cut=0 as default for stacked_violin plots for more pleasing results.
|
Some of the tests fail for reasons unrelated to the PR ( |
|
I think it’s again some flakiness of some dependency (or our interaction with it) |
|
@flying-sheep I see that the same tests are failing in other PRs. Do you have any idea what and when some change was introduced that broke the tests |
|
Looking at the commits page I can see that the tests has been failing for some days already. First was a problem with a notebook test (test_pbmc3k) that seems innocuous but should be addressed. This is related to release 1.4.3 (85acb6c). The commits are unrelated to the failing test so I assume that some dependency was updated However, after this commit 115d635 more errors are found. But again, I don't see any relevant changes that will cause the problems. One of the errors is that statsmodels is using a deprecated module from scipy.misc: This was introduced after scipy 1.3 was recently updated (statsmodels/statsmodels#5759). It seems that currently, the only solution is to install statsmodels directly from the master branch. Or downgrade scipy. |
|
setting scipy==1.2 fixes several errors but there is another one maybe related to matplotlib. |
|
The remaining failed test is related to matplotlib 3.1.0 and 3d scatter plots. There is a report of a similar error (matplotlib/matplotlib#14298). My suggestion is to wait for those issues to be solved and then upgrade the dependencies. |
|
Could you please add comments to the requirements.txt (need to be on their own lines)? This way, in case we forget, we’ll have reminders why the |
|
@flying-sheep good idea. Added in PR #664 |
updated notebook after scverse/scanpy#661
Added a dict param to plots scverse#646, updated docstring examples and fixed failing tests due to dependencies.
* updated notebook after scverse/scanpy#661 * updated visualization tutorial after scverse/scanpy#1210 Also rewrote some parts to make them more clear * updated notebook after @falexwolf review * moved notebook to plotting folder
This PR addresses #646 by adding the option to pass a dict to the plotting functions heatmap, dotplot, matrixplot, tracksplot and stacked_violin.
Now, when
var_namesis a dictionary thevar_group_labelsandvar_group_positionsare set such that the dictionary key is a label and the group is the dict values. In the following example the 'brackets' plot on top of the image are prepared based on the markers dictionary:This PR also introduces a small change in
sc.pl.stacked_violinby settingcut=0as default parameter forseaborn.violin. This produces in my opinion better plots by removing the extension of the violin past extreme points. This is specially useful to avoid the violin plot to extend below zero expression values.Update: I set the dependencies to
matplotlib==3.0.*andscipy==1.2to solve failing tests. More details in the conversation