Skip to content

texttemplate for heatmaps & histogram2d traces #1116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
colinfang opened this issue Nov 7, 2016 · 8 comments · Fixed by #6028
Closed

texttemplate for heatmaps & histogram2d traces #1116

colinfang opened this issue Nov 7, 2016 · 8 comments · Fixed by #6028
Labels
feature something new
Milestone

Comments

@colinfang
Copy link

For a heatmap, it is not very easy to do annotations that simply show text for each grid. (One has to specify x, xref, y, yref, ....

Can we borrow the idea from scatter, by introducing a mode parameter that allows to display text as well as marker/line?

@etpinard
Copy link
Contributor

etpinard commented Nov 7, 2016

Interesting.

Can we borrow the idea from scatter, by introducing a mode parameter that allows to display text as well as marker/line?

Why not use a scatter trace on top of the heatmap trace?

@colinfang
Copy link
Author

Then I have to make nrows scatter traces, which seems worse than the existing annotations.

If we are allowed to use mode = 'text', to print z values for heatmap can be as simple as

Heatmap(z=z, text=z, mode='text') 

@mafar
Copy link
Contributor

mafar commented Aug 9, 2019

i translated create_annotated_heatmap python plotly.py to js here as standalone.
#4116
i hope it gets integrated.

@Carl-Analytix
Copy link

This should be done in my opinion. I dont like using figurefactory for subplotting heatmaps. It is a pain extracting all the data out and making sure you have everything to be placed in the new subplot correctly. The same goes for annotations when doing a go.Heatmap. This utility would be great, especially if you could adjust the size, family, and color of the text. Maybe an annotation kwarg would be ideal for Heatmap types. And something to control word wrapping?

@ghost
Copy link

ghost commented Aug 31, 2021

Was this ever added? It's such a pain to manually create the values for annotating when they're already there in the tooltip to use.

@nicolaskruchten
Copy link
Contributor

We definitely want to do this, and it would be great to get an outside contributor to help :)

@archmoj
Copy link
Contributor

archmoj commented Nov 17, 2021

Instead of a text mode, it looks like texttemplate could/should be added.

@archmoj archmoj changed the title Suggest mode: text for heatmap texttemplate for heatmaps Nov 17, 2021
@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Nov 17, 2021

Yeah let's not add a mode, let's add a showtext attribute or something and texttemplate

@archmoj archmoj changed the title texttemplate for heatmaps texttemplate for heatmaps & histogram2d traces Nov 22, 2021
@archmoj archmoj added this to the v2.7.0 milestone Nov 23, 2021
@archmoj archmoj modified the milestones: v2.7.0, v2.8.0 Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants