Open
Description
The figure reference documentation says
plot_ly(df, type="heatmap"[, ...])
the df in the code above indicates a data frame
The code below doesn't work
url <- "http://datasets.flowingdata.com/ppg2008.csv"
nba_players <- read.csv(url, row.names = 1)
plot_ly(nba_players, type = "heatmap")
A solution is to use a data.matrix
plot_ly(z = data.matrix(nba_players),
x = colnames(nba_players),
y = row.names(nba_players),
type = "heatmap")