-
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
Color x-axis labels of heatmap generated by heatmaply #243
Comments
Sorry, it looks like varying tick text colour isn't possible in plotly at the moment. See the example code: library("plotly")
## Works
plot_ly(mtcars) %>% add_markers(~cyl, ~gear) %>%
layout(
xaxis=list(
tickvals = c(4, 6, 8),
tickfont=list(color = c("#7ea6f8"
#, "#a6f87e", "#a0f684"
))
)
)
## Doesn't work
plot_ly(mtcars) %>% add_markers(~cyl, ~gear) %>%
layout(
xaxis=list(
tickvals = c(4, 6, 8),
tickfont=list(color = c("#7ea6f8", "#a6f87e", "#a0f684"))
)
) I'll leave this open in case it becomes possible in future but I don't have the bandwidth to try to make the upstream changes at the moment. You could possibly accomplish some of the same effect using dendrogram colouring if that's useful? |
That is correct, I believe that is not possible. The point of the code I posted was to demonstrate (mainly for myself if I come back to this later) that it's not possible to set different tick text colour in plotly in general. Using a basic plot makes this easier than trying to modify heatmaply to test whether it is possible |
Ah ok. Thank you so much for your clarification |
How do I color the x-axis labels of a heatmap generated from heatmaply?
Example:
heatmaply( mtcars)
I want vs, am, carb, and wt to be colored in red and drat, gear, cyl, qsec, mpg, hp and disp to be colored in blue (attached)
The text was updated successfully, but these errors were encountered: