-
Notifications
You must be signed in to change notification settings - Fork 73
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
row_side_colors interferes with renaming colorbar legend tick text #205
Comments
Ah ha. I see here #95 that ggplot2 objects are converted to plotly objects. I'm guessing that, because this doesn't work when plot_method="plotly", the custom legend ticktext causes an issue when it's converted. |
This is a little confusing, because I imagine the ggplot2 plot object is converted to a plotly object when row_side_colors is not set and this doesn't cause any issues. It only causes issues when the ggplot2 object is converted to plotly and there is a row_side_colors colorbar + colorbar legend to convert as well. I imagine this is due to the complicated history of col_side_color legends. This feature the last obstacle in a tool dev project, so if it is possible to work around it, we would be very appreciative! |
I imagine what's happening here is that the order of subplots is different, so the call h[['x']][['data']][[length(h[['x']][['data']])]]... Needs to be changed. Specifically |
PS, if you happen to publish any work relating to this, please cite us |
@alanocallaghan ah ha! That makes sense. I'll try this. |
We've written our manuscript and have cited your paper. We also would like to acknowledge you personally @alanocallaghan for all of the help you've given me during dev. If this is amenable to you please let me know how you'd like your name to appear and your affiliations. |
Thanks @gtollefson, that's very generous! My name is Alan O'Callaghan and affiliation is MRC Human Genetics Unit, University of Edinburgh. Let me know if you have any further issues |
Can we close this issue? |
Unless @gtollefson has any further problems with this, yep (if so re-open) |
I'm renaming the legend colorbar tick text using
h[['x']][['data']][[length(h[['x']][['data']])]][['marker']][['colorbar']][['ticktext']] <- genotypes
, the solution @alanocallaghan suggested in #199. However, when I use the optionrow_side_colors
, this code does not work. I've included reprexes below. The only difference between the two examples isrow_side_colors
androw_side_palette
are set in the problem example(#2). As an aside, if I set plot_method="plotly" without row_side_colors, it also does not work but this isn't as much of a problem for me.Working example:
produces
Problem example:
produces
The text was updated successfully, but these errors were encountered: