# Dash annotated heatmap

**URL:** <https://community.plotly.com/t/dash-annotated-heatmap/31016>\
**Category:** Dash Python\
**Created:** [November 7, 2019, 4:47pm UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016 "2019-11-07T16:47:25Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![np162629](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@np162629](https://community.plotly.com/u/np162629)\
**Post date:** [July 10, 2020, 11:31am UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016/24 "2020-07-10T11:31:38Z")

</div>

Hi all,

Does anyone know how to make a custom colorscale so the negative numbers in their heatmap are Red and the positive ones are green? and maybe even put the numbers close to 0 at yellow?

Thank you

---

<div class="post-metadata">

**Author:** ![RenaudLN](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/renaudln/32/9041_2.png) [@RenaudLN](https://community.plotly.com/u/RenaudLN)\
**Post date:** [July 10, 2020, 11:49am UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016/25 "2020-07-10T11:49:35Z")

</div>

This question is off-topic, I’d recommend creating a new thread for it.

---

<div class="post-metadata">

**Author:** ![np162629](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@np162629](https://community.plotly.com/u/np162629)\
**Post date:** [July 10, 2020, 12:10pm UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016/26 "2020-07-10T12:10:35Z")

</div>

sure, apologies. new thread here: [Plotly Annotated Heatmap Colorscale (DASH)](https://community.plotly.com/t/plotly-annotated-heatmap-colorscale-dash/42290)

---

<div class="post-metadata">

**Author:** ![anitsay](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@anitsay](https://community.plotly.com/u/anitsay)\
**Post date:** [November 27, 2020, 4:08pm UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016/27 "2020-11-27T16:08:32Z")

</div>

Hello 🙂,  
I need to draw annotated heatmap which changes features (rows/columns) shown dynamically. When I draw for first time specific features lets say 9x9 matrix I got normal annotations.  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/1/19ac10c5bea821ce259ab78ca0f12fffae607428.png)  
But when added additional feature (matrix 10x10) I have issue with annotations are not shown at the right place. Has someone idea what can be the problem ?

![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/f/f3e940ec8ecf853c50bd239e29661a44ab941934.png)

I am using following code:

```auto
corr_text = np.around(corr_sw.values, decimals=2) 

font_colors = ['white', 'black'] 

x = y = corr_sw.columns.tolist()   

corr_matrix_fig = ff.create_annotated_heatmap(corr_sw.values, x=x, y=y, annotation_text=corr_text, colorscale='rdylbu', font_colors=font_colors, showscale = True)

#set xaxis to bottom
corr_matrix_fig['layout']['xaxis']['side'] = 'bottom'

```

tnx!

---

<div class="post-metadata">

**Author:** ![jessie25](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jessie25](https://community.plotly.com/u/jessie25)\
**Post date:** [March 4, 2021, 6:47am UTC](https://community.plotly.com/t/dash-annotated-heatmap/31016/28 "2021-03-04T06:47:46Z")

</div>

Hi! I want to make a annotated heatmap in a tab web. So if you have multiple tables（use html.Div() ）, what do you do with ff.create\_heatmap() statement? I’ve tried a couple of inserts and they don’t work very well. Thank you!!

[Previous page](https://community.plotly.com/t/dash-annotated-heatmap/31016.md?page=1)
