plotly / plotly/plotly.py

Option to compress numpy array in `hovertemplate` `customdata` for `px.imshow`

Open
#5,003 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Our application enables the generation of multiplexed images, where image regions show multiple "markers" in a tissue sample to demonstrate spatial patterns of marker co-occurrence.

We enable users to toggle a custom hovertemplate that shows the underlying raw array values for each marker before they are converted to RGB:

Image

However, this becomes noticeably slower as the number of markers grows linearly; we pass the customdata template as a stacked numpy array paired with custom hovertext.

An option to compress this template array would help in increasing the speed and effectiveness of using customdata for our hovertemplate

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; start by locating px.imshow and the handling of customdata with hovertemplate, then identify the existing NumPy-array path. Done would require a defined compression option, preserved hover values, and agreed performance evidence, none of which the issue currently specifies.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.