You could use the type='heatmap' with add_annotations to add the y variable. Make sure showarrow = FALSE like this:
library(plotly)
library(dplyr)
TestData1 %>%
plot_ly(x = ~Countries, y = ~variable, z = ~value, type = "heatmap", colors = c("#56B1F7", "#132B43")) %>%
add_annotations(text = ~value, x = ~Countries, y = ~variable, showarrow = FALSE, font = list(color = "white")) %>%
layout(xaxis = list(side = "top"),
yaxis = list(title = ""),
showlegend = FALSE) %>%
hide_colorbar()

Created on 2023-03-17 with reprex v2.0.2
Answer from Quinten on Stack OverflowPlotly
plotly.com โบ r โบ heatmaps
Heatmaps in R
Note: We are retiring documentation for R, MATLAB, Julia, and F#. Learn more about this change here. library(plotly) fig <- plot_ly(z = volcano, type = "heatmap") fig
R Graph Gallery
r-graph-gallery.com โบ 215-interactive-heatmap-with-plotly.html
Plotly heatmap โ the R Graph Gallery
# Load the plotly package library(plotly) # Data: mtcars: data <- as.matrix(mtcars) # Normalize data data <- apply(data, 2, function(x){x/mean(x)}) # Heatmap p <- plot_ly(x=colnames(data), y=rownames(data), z = data, type = "heatmap", colorscale= "Earth", showscale = F) %>% layout(margin = list(l=120)) p # save the widget # library(htmlwidgets) # saveWidget(p, file=paste0( getwd(), "/HtmlWidget/plotlyHeatmap2.html"))
Plotly
plotly.com โบ r โบ reference โบ heatmap
R Figure Reference: heatmap Traces
Then, by default, the resulting heatmap will have N partitions along the y axis and M partitions along the x axis. In other words, the i-th row/ j-th column cell in `z` is mapped to the i-th partition of the y axis (starting from the bottom of the plot) and the j-th partition of the x-axis (starting from the left of the plot).
Starred by 406 users
Forked by 75 users
Languages: R 99.8% | Makefile 0.2%
CRAN
cran.r-project.org โบ package=heatmaply
heatmaply: Interactive Cluster Heat Maps Using 'plotly' and 'ggplot2'
July 12, 2025 - This work is based on the 'ggplot2' and 'plotly.js' engine. It produces similar 'heatmaps' to 'heatmap.2' with the advantage of speed ('plotly.js' is able to handle larger size matrix), the ability to zoom from the 'dendrogram' panes, and the ...
Plotly
community.plotly.com โบ plotly r, matlab, julia, net
Help with a Heatmap Graph - Plotly R, MATLAB, Julia, Net - Plotly Community Forum
November 19, 2022 - Can someone help me with graph like the one attached ? Any pointers that I can use to create this kind of graph. My data is each row in the graph is a column in the dataframe with its own category. I would like to create something like the attached and also create a legend for each category.
Talgalili
talgalili.github.io โบ heatmaply
Interactive Cluster Heat Maps Using plotly and ggplot2 โข heatmaply
Create interactive cluster heatmaps ... details or drag a rectangle to zoom. A heatmap is a popular graphical method for visualizing high-dimensional data, in which a table of numbers are encoded as a grid of colored cells....
TutorialsPoint
tutorialspoint.com โบ plotly โบ plotly_heatmap.htm
Plotly - Heatmap
Heat Maps are innately self-explanatory. The darker the shade, the greater the quantity (the higher the value, the tighter the dispersion, etc.). Plotlys graph_objects module contains Heatmap() function.
CRAN
cran.r-project.org โบ web โบ packages โบ heatmaply โบ vignettes โบ heatmaply.html
Introduction to heatmaply - CRAN
heatmaply also provides an interface based around the plotly R package. This interface can be used by choosing plot_method = "plotly" instead of the default plot_method = "ggplot".
Zikai Lin
zikai.page โบ heatmap_plotly2
R-Blog: Heatmap using R Plotly - Zikai Lin
February 1, 2021 - But a reverse scale, which is Blue-Red colorscheme are more often used, so you might want to specify reversescale = TRUE ยท library(plotly) fig <- plot_ly(z = volcano, type = "heatmap", colors = "RdBu", reversescale =T) fig
R-universe
talgalili.r-universe.dev โบ heatmaply
heatmaply: Interactive Cluster Heat Maps Using 'plotly' and 'ggplot2'
'Heatmaps' are used in many fields ... and more. Interactive 'heatmaps' allow the inspection of specific value by hovering the mouse over a cell, as well as zooming into a region of the 'heatmap' by dragging a rectangle around the relevant area. This work is based on the 'ggplot2' ...
YouTube
youtube.com โบ watch
Heatmap in R (3 Examples) | Base R, ggplot2 & plotly Package | How to Create Heatmaps - YouTube
How to draw a heatmap in the R programming language. More details: https://statisticsglobe.com/heatmap-in-rR code of this video:##### Example dataset.seed(12...
Published: October 26, 2019