A.Trzcionkowska
A.Trzcionkowska

Reputation: 143

R Plotly - change names of axis in heatmap

I don't know how to change names of axis in my heatmap. This is my example code:

 p <- plot_ly(x = XXX, y =  YYY, z = ZZZ, type = "heatmap")
 p

And I wont to my axis different names.

Upvotes: 2

Views: 2867

Answers (1)

MLavoie
MLavoie

Reputation: 9876

Here is an example (you did not provide a reproducible example) that will give you x/y labels and a title

x <- list(
    title = "x Axis"
)
y <- list(
    title = "y Axis"
)
plot_ly(z = volcano, colorscale = "Hot", type = "heatmap") %>% layout(title = "Hello", xaxis = x, yaxis = y) 

Upvotes: 2

Related Questions