Skip to content

Conversation

@AnnaChristina
Copy link
Member

closes #1502

ensure that legend_loc=None also removes continuous colorbars for scatterplots like umap

@AnnaChristina AnnaChristina changed the title remove colorbar im legend_loc is None for continuous colorbars remove colorbar if legend_loc=None for continuous colorbars Apr 29, 2021
@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #1821 (6c1b551) into master (b8c2cf5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1821   +/-   ##
=======================================
  Coverage   71.95%   71.95%           
=======================================
  Files          98       98           
  Lines       11537    11538    +1     
=======================================
+ Hits         8301     8302    +1     
  Misses       3236     3236           
Impacted Files Coverage Δ
scanpy/plotting/_docs.py 100.00% <ø> (ø)
scanpy/plotting/_tools/scatterplots.py 88.24% <100.00%> (+0.02%) ⬆️

@ivirshup
Copy link
Member

ivirshup commented Apr 30, 2021

Thanks for the PR!

Does legend_loc ever interact with colorbars otherwise? At least for the embedding plots, I think it only refers to categorical legends. Should colorbar positioning be separate from this argument, especially since options like "on data" don't really apply?

@AnnaChristina
Copy link
Member Author

would also make sense to have this as colorbar_loc as this only really applies for continuous coloring, right? I can definetly see the benefit of removing colorbar from figure if this is wanted by the user

@ivirshup
Copy link
Member

Sorry for the late reply, thought I responded to this!

would also make sense to have this as colorbar_loc as this only really applies for continuous coloring

I think that would make sense

@LidiaML
Copy link

LidiaML commented Aug 10, 2021

Hi!
Could you finally solve the issue of removing colorbar from the figure? I have tried with the legend_loc=None and legend_loc='none' and they don't remove continuous colorbars. I have tried to fix this issue myself but couldn't find the exact place in the code to do that. Any help would be more than welcome!

@MMRES-PyBootcamp
Copy link

Hi!
Could you finally solve this issue? I am trying to remove a continuous colorbar from a umap and I cannot make it.
Thanks,

Lídia

@ivirshup ivirshup added this to the 1.9.0 milestone Mar 21, 2022
@ivirshup
Copy link
Member

Just changed the argument a little and added a test. Will be out soon!

@ivirshup ivirshup merged commit 19d2ab2 into master Mar 31, 2022
@ivirshup ivirshup mentioned this pull request Apr 25, 2022
5 tasks
@flying-sheep flying-sheep deleted the embedding_legend_loc_None branch October 30, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better document legend_loc=None for embedding plots

5 participants