question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facecolor of scatter plots for categorical data fail to be non-transparent.

See original GitHub issue

Hi,

Even when we set sc.settings.set_figure_params(transparent=False) the scatter plot for CATEGORYCAL data is transparented. (ex. sc.pl.umap(adata, color='louvain') ) Continuous data goes well, so I think it is a bug.

When you switch Jupyterlab’s theme into dark, it will be easy to check.

Best, Yoshiaki

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
flying-sheepcommented, Feb 13, 2019

Expliciting that ‘white’, ‘w’ or (1,1,1) are also applicable may be kind.

Definitely! Good docs are everything.

0reactions
yyoshiakicommented, Feb 13, 2019

I was wrong, it worked well…

%matplotlib inline

import scanpy as sc
import matplotlib as mpl

# 2 lines below solved the facecolor problem.
mpl.rcParams['figure.facecolor'] = 'white'
sc.settings.set_figure_params(dpi=80, color_map='viridis', transparent=False)

adata = sc.datasets.paul15()
sc.pp.recipe_zheng17(adata)
sc.tl.pca(adata, svd_solver='arpack')
sc.pl.pca(adata, color='paul15_clusters', legend_loc='on data')

screenshot from 2019-02-13 12-42-06

Anyway,

So we should add a facecolor parameter and deprecate transparent (with a nice message to point people to set_figure_params(facecolor=(0, 0, 0, 0)))

sounds a good solution. Expliciting that ‘white’, ‘w’ or (1,1,1) are also applicable may be kind. Of course, you can add theme like Seurat’s one though I’m not sure how many people are requiring it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Facecolor of scatter plots for categorical data fail to be non ...
Hi, Even when we set sc.settings.set_figure_params(transparent=False) the scatter plot for CATEGORYCAL data is transparented.
Read more >
Holoviews scatter plot color by categorical data - Stack Overflow
Goal is to produce two datasets in a single frame, with a categorical column keeping track of the source. Then i try plotting...
Read more >
3D surface (colormap) — Matplotlib 3.6.2 documentation
Demonstrates plotting a 3D surface colored with the coolwarm colormap. The surface is made opaque by using antialiased=False . Also demonstrates using the ......
Read more >
Be Awesome in ggplot2: A Practical Guide to be Highly Effective
It can be used to create quickly and easily different types of graphs: scatter plots, box plots, violin plots, histogram and density plots....
Read more >
30 ggplot basics | The Epidemiologist R Handbook
Add “geom” layers - these functions visualize the data as geometries (shapes), e.g. as a bar graph, line plot, scatter plot, histogram (or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found