Repository navigation
Plotting examples - #1632
Plotting examples#1632
Conversation
88dc259 to
b83d444
Compare
|
@ivirshup This looks great! Thanks. The issue with the cropping of the labels is quite annoying and indeed The same issue also affects the test images which most are cropped. |
|
Update: Nvm, I figured this out. Tt had to do with Old problem@flying-sheep, weird sphinx bug I'm running into:
scanpy/scanpy/external/pp/_bbknn.py:docstring of scanpy.external.pp.bbknn:24: WARNING: py:class reference target not found: sklearn.neighbors._dist_metrics.DistanceMetric
.. plot::
:context: close-figs
>>> import scanpy as sc
>>> adata = sc.datasets.pbmc68k_reduced()
>>> sc.tl.umap(adata)
For now, I'm going to remove the type annotation from |
|
I don't think making a broader change would be so bad right now, especially if it deals with this issue. However, if there was a way to just fix the issue here specifically that would also be good. Separate issue these examples raise: It looks like the colormap is changing at some point when it shouldn't: Any idea what's up with this? |
|
For this PR, I'm thinking I'm going to wait on a response from @flying-sheep to figure out what to do about the sklearn intersphinx problem, then clean it up for a merge. A new issue will be opened up with all the functions that need examples, and those can be added through separate PRs as the release progresses. |
|
@ivirshup the color change is caused because of the way the defaults are used. This is an issue that has to do with the visualisation of defaults in the documentation. When you add However, setting the default of the colormap to We had some discussions with @flying-sheep on how to address this that are still pending but ideas on how to address this are welcome. |
|
Is there an open issue for this colormap problem? If so, could you link it? I'd like to track it for at least 1.8. |
* Fix DistanceMetric annotation for bbknn * Fix some warnings
08a3d83 to
3e28762
Compare
|
So far looking good. Maybe we can add to the TO-DO list, to fix issue with the 'cropped' labels. |
|
I think this is ready to merge. After that, I'll open the meta-issue about adding examples to all the listed functions. |


Re #1604, @fidelram, I've got the sphinx extension working for examples (at least locally) here. You can check out a simple example for
sc.pl.embedding.Does this solve the problem you were running into?
Functions which need examples
Functions in
sc.plsc.pl.embeddingsc.pl.draw_graphsc.pl.diffmapsc.pl.pcasc.pl.tsnesc.pl.umapsc.pl.spatialsc.pl.embedding_densitysc.pl.pca_loadingssc.pl.pca_overviewsc.pl.pca_scattersc.pl.pca_variance_ratiosc.pl.pagasc.pl.paga_adjacencysc.pl.paga_comparesc.pl.paga_pathsc.pl.dpt_groups_pseudotimesc.pl.dpt_timeseriessc.pl.dotplotsc.pl.matrixplotsc.pl.clustermapsc.pl.heatmapsc.pl.dendrogramsc.pl.stacked_violinsc.pl.tracksplotsc.pl.violinsc.pl.filter_genes_dispersionsc.pl.highest_expr_genessc.pl.highly_variable_genessc.pl.rank_genes_groupssc.pl.rank_genes_groups_dotplotsc.pl.rank_genes_groups_heatmapsc.pl.rank_genes_groups_matrixplotsc.pl.rank_genes_groups_stacked_violinsc.pl.rank_genes_groups_tracksplotsc.pl.rank_genes_groups_violinsc.pl.rankingsc.pl.scattersc.pl.simsc.pl.correlation_matrixsc.pl.matrixsc.pl.timeseriessc.pl.timeseries_as_heatmapsc.pl.timeseries_subplotOther functions
sc.pp.calculate_qc_metricssc.tl.embedding_densitysc.get.obs_dfsc.get.rank_genes_groups_df