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

Get grid_gap to work when RowSideColors is used #53

Open
talgalili opened this issue Apr 11, 2017 · 10 comments
Open

Get grid_gap to work when RowSideColors is used #53

talgalili opened this issue Apr 11, 2017 · 10 comments
Assignees

Comments

@talgalili
Copy link
Owner

For example, in here:

library(heatmaply)
heatmaply(iris, grid_gap = 3)

We also want the grid to work on the row side color

image

talgalili added a commit that referenced this issue Apr 11, 2017
@alanocallaghan
Copy link
Collaborator

You could try replacing geom_raster with geom_tile in side_color_plot, as that should be the only major difference.

@talgalili
Copy link
Owner Author

talgalili commented Apr 11, 2017 via email

talgalili added a commit that referenced this issue Apr 11, 2017
@talgalili
Copy link
Owner Author

Nope, doesn't seem to work. I pushed this attempt to the main repo.
Yet I get:

> heatmaply(iris, grid_gap = 2)
Warning message:
'scatter' objects don't have these attributes: 'xgap'
Valid attributes include:
'type', 'visible', 'showlegend', 'legendgroup', 'opacity', 'name', 'uid', 'hoverinfo', 'stream', 'x', 'x0', 'dx', 'y', 'y0', 'customdata', 'dy', 'ids', 'text', 'mode', 'hoveron', 'line', 'connectgaps', 'fill', 'fillcolor', 'marker', 'textposition', 'textfont', 'r', 't', 'error_y', 'error_x', 'xaxis', 'yaxis', 'xcalendar', 'ycalendar', 'xsrc', 'ysrc', 'customdatasrc', 'idssrc', 'textsrc', 'textpositionsrc', 'rsrc', 'tsrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey'
 

With this output:

image

@alanocallaghan
Copy link
Collaborator

Depends on #38 as xgap only works for heatmaps, and ggplotly only converts to heatmaps when numeric (I think)

@talgalili
Copy link
Owner Author

Would this be worth opening an issue in ropensci/plotly? (I suspect not, but wanted to check in with you also)

@alanocallaghan
Copy link
Collaborator

No, I think it's pretty fundamental to how plotly.js handles heatmaps. It would be nice to get categorical heatmap support in plotly.js but I suspect that's a big ask! BTW, I'm making progress on that, but mouseover text may be a problem... Not sure if it's worth sacrificing that for the improvements that would be made

@talgalili
Copy link
Owner Author

Mouseover is essential I believe. It might be worth suggesting as an issue on ropensci/plotly (I'll upvote it :) )

@alanocallaghan
Copy link
Collaborator

I was just passing hovertext in the wrong format! Should be up and running with this in a few days

@talgalili
Copy link
Owner Author

That's great to hear, thanks!

@alanocallaghan
Copy link
Collaborator

Works in plot_method = "plotly", still broken in ggplotly.

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

No branches or pull requests

2 participants