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
1
vote
1 answer

Box outside my y axis in matplotlib/seaborn

I"m trying to add a descriptive box outside my y axis on my heatmap in matplotlib/seaborn. I tried an additional subplot and hspan, but they weren't working for me. Help please! import matplotlib.pyplot as plt import pandas as pd import seaborn as…
TER
  • 107
  • 6
1
vote
1 answer

Custom HeatMap Issue on Scale and legend

I try to create a custom heatmap but have an issue on the y scale. The code I built is the following one : cmap = colors.ListedColormap(['red','green']) bounds=[-1,1] norm = colors.BoundaryNorm(bounds, cmap.N) heatmap = plt.pcolor(np.array(result),…
TourEiffel
  • 4,034
  • 2
  • 16
  • 45
1
vote
0 answers

How to create a density or heatmap with 2D data array?

I need some help making a density/heatmap with lat/long coordinates. I've been able to plot these points by themselves on a map (see below), but need to see the density. Here is the code I have. import pandas as pd import geopandas import…
jakehou97
  • 19
  • 4
1
vote
1 answer

How to adjust line width of a bodymap in R when package doesn't have this function

I am working with the CHOIRBM package (https://github.com/emcramer/CHOIRBM) and made a body map looking at prevalence and pain throughout the body. I want to alter the thickness of the lines on the bodymap itself but the package doesn't appear to…
1
vote
1 answer

Add more data to a heatmap from other df

I need your help! I am plotting a heatmap and I do not have any error, but I do not know how to resolve it because I haven't seen any similar post. I have 2 dataframes: DF1: Basal HER2 LumA LumB GATA3 -0.198 0.001 0.497 0.138 IL2RA …
WindSur
  • 141
  • 7
1
vote
1 answer

format text cell for empty values and color cell for all negative values

I am generating a plotly heatmap as follow: @app.callback( Output('graph', 'figure'), [ Input('submit', 'n_clicks') ], prevent_initial_call=True ) def update_plot(n_clicks): if n_clicks: my_row = ['T-3', 'T-2',…
Hotone
  • 431
  • 3
  • 18
1
vote
1 answer

How to make a function to check if the combination and or redundancy of words has a correlation with the number of sales?

In my dataframe highlighting product sales on the internet, I have a column that contains the description of each product sold. I would like to create an algorithm to check if the combination and or redundancy of words has a correlation with the…
ElMeTeOr
  • 55
  • 10
1
vote
1 answer

How to control the height of geom_tile()

With this dataframe: df <- structure(list(region = c("AA", "BB", "CC", "DD"), event1 = c("XXX", "XXX", "XXX", "XXX"), value = c(3, 1, 2, 2)), row.names = c(NA, -4L), class = c("tbl_df", "tbl", "data.frame")) region event1 value
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
0 answers

Reorder and split the ggplot heatmap based on the clusters in one of the columns

I generated a heatmap with ggplot, and order the samples by using hclust, However, I still need more reordering to get all the similar values corespondent with one of the samples in the ordered cluster. Here I generate a samples data to explain…
Jackie
  • 63
  • 5
1
vote
1 answer

Correlation Matrix Heatmap - use legend to toggle visible items

I am using Plotly to create a heatmap which reflects a correlation matrix. I would like to know if it's possible to toggle which items are displayed in the plot using the legend. For example, the below creates a 10x10 matrix and respective heatmap.…
EdH
  • 240
  • 3
  • 9
1
vote
1 answer

Is it possible to create a heatmap within a SOM-Cluster with the values of a dimension, which is not included in the cluster itself in R?

I have created a clustering with the help of the kohonen package in R. The cluster is defined by 6 different attributes, and results in a 15x15 matrix = 225 different clusters. Now I want to create some kind of legend, to fill every cluster…
lucas_0511
  • 11
  • 1
1
vote
1 answer

Adding whitespace to Matplotlib heatmap using imshow

I'm using Matplotlib's imshow to plot data as a function of two variables, one of which is time. There were significant interruptions in data collection in many cases, and I want to note that on the graph using whitespace (or something similar)…
mknote
  • 157
  • 1
  • 3
  • 12
1
vote
2 answers

Automatically categorize and add annotations using pheatmap in R

I have a dataframe made by the school grades of some students in different subjects. The students are also characterized by their gender (F or M), that is included as a suffix in their names (e.g. Anne_F, Albert_M, etc...) With these data I have…
EmaK
  • 154
  • 1
  • 9
1
vote
1 answer

d3.timeFormat on domain has only 1 value

I am trying to replace dayofweek integer to its corresponding names. var y_label = [...new Set(data.map((item) => item.y))].sort(d3.descending); // [0 - 6] // Build Y scales and axis: const y = d3.scaleBand().range([height,…
XEmporea
  • 35
  • 1
  • 4
1
vote
1 answer

How to add a dollar sign to a seaborn heatmap

I have the following code that generates a Heatmap in Pandas: def create_cohort(cohort_size,retention_matrix,titulo): print(f"{titulo}\n") with sns.axes_style("white"): fig, ax = plt.subplots(1, 2, figsize=(12, 8), sharey=True,…
user3347814
  • 1,138
  • 9
  • 28
  • 50