Skip to content

Discussion: add title to multiple colorbars? #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LucaMarconato opened this issue Sep 27, 2024 · 1 comment
Open

Discussion: add title to multiple colorbars? #361

LucaMarconato opened this issue Sep 27, 2024 · 1 comment
Labels
🗣️ discussion Needs further discussion

Comments

@LucaMarconato
Copy link
Member

LucaMarconato commented Sep 27, 2024

##
from spatialdata.datasets import blobs
import spatialdata_plot
import matplotlib.pyplot as plt

sdata = blobs()
sdata['blobs_polygons']['column'] = 0

(
    sdata.pl.render_images('blobs_image')
    .pl.render_shapes('blobs_circles', color='radius')
    .pl.render_shapes('blobs_polygons', color='column')
    .pl.show()
)
plt.show()

gives
image
Which looks great! But it may be confusing to know which colorbar refers to what. I would consider one of the following:

  1. we leave it as it is: the user should use different colorbars (e.g. viridis + gray) when plotting multiple elements at the same time, so the ambiguity doesn't exist
  2. we add a title on top of the colorbar to make clear what the colorbar refers to
  3. we show only one colorbar maximum.

I prefer having multiple colorbar, so I'd choose either 1 or 2. @timtreis @Sonja-Stockhaus wdyt?

@LucaMarconato LucaMarconato added the 🗣️ discussion Needs further discussion label Sep 27, 2024
@timtreis
Copy link
Member

Don't like 3) either.

Vaguely related to #349 in which I have to refactor the entire logic anyway. One option would be to add cbar_title to the individual calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗣️ discussion Needs further discussion
Projects
None yet
Development

No branches or pull requests

2 participants