Skip to content
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

[FEATURE] Separate colorbars for multiple row annotations #284

Open
sergiumocanu opened this issue Dec 20, 2022 · 3 comments
Open

[FEATURE] Separate colorbars for multiple row annotations #284

sergiumocanu opened this issue Dec 20, 2022 · 3 comments

Comments

@sergiumocanu
Copy link

Hi,

Thank you for making an awesome heatmap package integrated with plotly.

I'm wondering, is it possible to separate the colorbars of multiple row annotations into their own separate colorbars?

row_side_colors <- data.frame(iris[, 4:5])
heatmaply::heatmaply(
    iris[, 1:3],
    plot_method = "plotly",
    row_side_colors = row_side_colors
)

Here both annotations are combined in one colorbar.
image

Thanks in advance!

@alanocallaghan
Copy link
Collaborator

Yes, mostly, although it is sometimes inconsistent. See eg https://stackoverflow.com/questions/60458220/two-or-three-colorbars-for-one-plot-in-plotly

@sergiumocanu
Copy link
Author

Thank you @alanocallaghan for the suggestion. However, that's not really the same thing. They are just plotting a second scatter plot trace and adding its corresponding colorbar.

In my example, the colorbars are combined together into one, even though I would like Species and Petal.Width to have their own bars.

@alanocallaghan
Copy link
Collaborator

You asked

is it possible to separate the colorbars of multiple row annotations into their own separate colorbars?

I replied with an example documenting use of multiple colorbars with a note about my experience in trying to implement this myself in heatmaply, so I can revisit this later. I wasn't trying to say they were identical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants