scverse / scverse/scanpy

sc.pl.umap not properly handling Matplotlib ax object

Open
#2,477 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the master branch of scanpy.

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Minimal code sample (that we can copy&paste without having any data)
with plt.style.context("seaborn-white"):
    fig, ax = plt.subplots(figsize=(8,8))
    sc.pl.umap(adata_clr, color=['id_jira'], ax=ax, s=200 )
    fig.suptitle("SOLEXASEQ-1672/1680 | Aitchison Distance [THIS SHOULD BE SUPTITLE]", fontsize=15)
    ax.set_title("SOLEXASEQ-1672/1680 | Aitchison Distance [THIS SHOULD BE TITLE]", fontsize=15)

image

Versions

anndata 0.8.0
scanpy 1.9.3

Bio 1.79
PIL 9.0.1
PyQt5 NA
adjustText NA
appnope 0.1.2
asttokens NA
backcall 0.2.0
beta_ufunc NA
binom_ufunc NA
brotli NA
cachecontrol 0.12.10
certifi 2022.12.07
cffi 1.15.0
charset_normalizer 2.0.11
colorama 0.4.4
comm 0.1.1
compositional 2022.8.31
cycler 0.10.0
cython_runtime NA
dateutil 2.8.2
debugpy 1.6.4
decorator 5.1.1
defusedxml 0.7.1
ensemble_networkx 2023.1.23
entrypoints 0.4
ete3 3.1.2
executing 0.8.2
fastcluster 1.1.26
fontTools 4.29.1
h5py 3.7.0
hdmedians NA
hive_networkx 2021.05.18
hypergeom_ufunc NA
idna 3.3
igraph 0.10.2
ipykernel 6.19.4
ipython_genutils 0.2.0
ipywidgets 8.0.4
jedi 0.18.1
jinja2 3.0.3
joblib 1.1.0
jupyter_server 1.23.4
kiwisolver 1.3.2
leidenalg 0.9.1
llvmlite 0.38.0
lxml 4.7.1
markupsafe 2.0.1
matplotlib 3.5.1
matplotlib_inline NA
matplotlib_venn 0.11.6
mpl_toolkits NA
msgpack 1.0.3
natsort 8.1.0
nbinom_ufunc NA
networkx 2.6.3
numba 0.55.1
numpy 1.21.5
packaging 21.3
palettable 3.3.0
pandas 1.4.0
parso 0.8.3
patsy 0.5.2
pexpect 4.8.0
pickleshare 0.7.5
pkg_resources NA
platformdirs 2.3.0
prompt_toolkit 3.0.26
psutil 5.9.4
ptyprocess 0.7.0
pure_eval 0.2.2
pycparser 2.21
pydev_ipython NA
pydevconsole NA
pydevd 2.9.1
pydevd_file_utils NA
pydevd_plugins NA
pydevd_tracing NA
pygments 2.11.2
pynndescent 0.5.6
pyparsing 3.0.7
pytz 2021.3
pytz_deprecation_shim NA
requests 2.27.1
rpy2 3.5.6
scipy 1.8.0
seaborn 0.11.2
session_info 1.0.0
setuptools 60.7.1
sip NA
six 1.16.0
skbio 0.5.6
sklearn 1.0.2
socks 1.7.1
soothsayer 2022.8.31
soothsayer_utils 2022.6.24
stack_data 0.1.4
statsmodels 0.13.1
texttable 1.6.4
threadpoolctl 3.1.0
tornado 6.1
tqdm 4.62.3
traitlets 5.1.1
typing_extensions NA
tzlocal NA
umap 0.5.2
unicodedata2 NA
urllib3 1.26.8
wcwidth 0.2.5
xarray 2023.1.0
zmq 24.0.1
zoneinfo NA

IPython 8.0.1
jupyter_client 7.3.4
jupyter_core 5.0.0
jupyterlab 3.5.2
notebook 6.5.2

Python 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:55:37) [Clang 14.0.6 ]
macOS-12.6-x86_64-i386-64bit

Session information updated at 2023-04-27 15:56

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sc.pl.umap entry point and reproduce the provided minimal example with a Matplotlib ax. Compare the resulting figure with the expected suptitle and axes title shown in the report; done means the supplied ax displays the requested titles as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.