Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Adding title to a type = "heatmap" plot

I have a problem adding title to a plotly plot of heatmap type. p <- layout(title = “title”) doesn’t seem to do anything. I was wondering it there is a solution to this problem.


If anyone has this problem remember to put %>% after the plot_ly function. An example would be:

plot_ly(x = xs,y = ys,z = zs,type = “heatmap”) %>% layout(title = “Your title”)