Questions tagged [heatmap]

A heat map is a graphical representation of data where the individual values contained in a matrix are represented as colors.

A heat map (or heatmap) is a graphical representation of data where the individual values contained in a matrix are represented as colors.

Heat maps can be used to display statistics (especially in statistical computing and graphics), user experience on websites.

An example of a heat map:

Source: seaborn.heatmap

Additional Resources

Related Tags

4357 questions
20
votes
3 answers

Responsive Heatmaps

The Problem I've encountered a slight problem where I've written some code where I've automated a script to track the users interactions with a UI, including mousemove & click events. If I didn't have to worry about making it responsive, then I…
JO3-W3B-D3V
  • 2,124
  • 11
  • 30
20
votes
2 answers

Reversing default scale gradient ggplot2

I am newbie, I am trying to desing a heat map. This is my code: ggplot(gd, aes(Qcountry, Q6_1_Q6d), order = TRUE) + geom_tile(aes(fill = prob), colour = "white") + theme_minimal() + labs( y = "Main reason for mobility", x = "Country") + …
Tito Sanz
  • 1,280
  • 1
  • 16
  • 33
20
votes
2 answers

How to make seaborn.heatmap larger (normal size)?

I displayed plot with the following command in jupyter notebook: sns.heatmap(pcts, annot=True, linewidth=.1, vmax=99, fmt='.1f', cmap='YlOrRd', square=True, cbar=False) plt.yticks(list(reversed(range(len(indices)))), ['Index '+str(x) for x in…
Dims
  • 47,675
  • 117
  • 331
  • 600
20
votes
2 answers

Getting geom_tile to draw square rather than rectangular cells

I'm trying to generate a heatmap plot using ggplot's geom_tile. My data have far more rows than columns. set.seed(1) df <- data.frame(val=rnorm(100),gene=rep(letters[1:20],5),cell=c(sapply(LETTERS[1:5],function(l)…
dan
  • 6,048
  • 10
  • 57
  • 125
20
votes
2 answers

easiest way to discretize continuous scales for ggplot2 color scales?

Suppose I have this plot: ggplot(iris) + geom_point(aes(x=Sepal.Width, y=Sepal.Length, colour=Sepal.Length)) + scale_colour_gradient() what is the correct way to discretize the color scale, like the plot shown below the accepted answer here…
user248237
19
votes
2 answers

Library to generate heat map map overlay based off point values not point densities

I have a set of data points where each point is expressed as a lat/lng. Each of these points has a value associated with it that changes over time. I would like to produce a heatmap animation overlay on top of a map that reflects this change in…
Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126
19
votes
2 answers

heatmap-like plot, but for categorical variables

I have three factors (set1, set2, and set3) for each of about 50 individuals. The values for set1, set2, and set3 are "A","B","C". I'd like to make a heatmap-like plot of these data but have the legend show the color associated with the values…
seandavi
  • 2,818
  • 4
  • 25
  • 52
18
votes
1 answer

setting distance matrix and clustering methods in heatmap.2

heatmap.2 defaults to dist for calculating the distance matrix and hclust for clustering. Does anyone now how I can set dist to use the euclidean method and hclust to use the centroid method? I provided a compilable code sample bellow. I tried:…
jonas87
  • 672
  • 2
  • 8
  • 22
18
votes
3 answers

How to express classes on the axis of a heatmap in Seaborn

I created a very simple heatmap chart with Seaborn displaying a similarity square matrix. Here is the one line of code I used: sns.heatmap(sim_mat, linewidths=0, square=True, robust=True) sns.plt.show() and this is the output I get: What I'd like…
rano
  • 5,616
  • 4
  • 40
  • 66
18
votes
4 answers

How to change heatmap.2 color range in R?

I'm using gplot to produce a heatmap showing log2-fold changes of a treatment groups versus paired controls. With the following code: heatmap.2(as.matrix(SeqCountTable), col=redgreen(75), density.info="none", trace="none",…
Lippy
  • 373
  • 1
  • 2
  • 9
17
votes
5 answers

How can I make a heatmap with a large matrix?

I have a 1000*1000 matrix (which only includes integer 0 and 1), but when I tried to make a heatmap, an error occurs because it is too large. How can I create a heatmap with such a large matrix?
question
  • 487
  • 3
  • 8
  • 13
17
votes
8 answers

Heightmap generation algorithm?

I was looking around the internet and couldn't find a perfect algorithm for this particular problem: Our customer have a set of points and weight data along with each point as can be demonstrated by this image: weighted points…
chakrit
  • 61,017
  • 25
  • 133
  • 162
17
votes
6 answers

Can I plot a colorbar for a bokeh heatmap?

Does bokeh have a simple way to plot the colorbar for a heatmap? In this example it would be a strip illustrating how colors correspond to values. In matlab, its called a 'colorbar' and looks like this:
bs123
  • 1,183
  • 3
  • 11
  • 21
17
votes
3 answers

Cluster data in heat map in R ggplot

Please see my plot below: my code: > head(data) X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 NM_001001144 6.52334 9.75243 5.62914 6.833650 6.789850 7.421440 8.675330 12.117600 11.551500 …
user3741035
  • 2,455
  • 4
  • 15
  • 20
17
votes
3 answers

How do I create a continuous Github-like calendar with Cal-Heatmap?

I've just started using cal-heatmap to create a Github-like calendar (e.g. a heat map for each day of the year in blocks). Ideally I'd like it to look something like so: Unfortunately, with my settings I keep getting something more like: Where the…
bbengfort
  • 5,254
  • 4
  • 44
  • 57