`zmax` argument not effective in `px.imshow` when `img` contains `np.nan`
Open
Nobody has claimed this yet.
bug
P3
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Results for
import pandas as pd
import numpy as np
import plotly.express as px
df = pd.DataFrame({"foo": [1, 2, 3]})
px.imshow(df, zmax=2)
Results for
import pandas as pd
import numpy as np
import plotly.express as px
df = pd.DataFrame({"foo": [1, 2, 3, np.nan]})
px.imshow(df, zmax=2)
When df contains np.nan, zmax is not taking effect. Intesrestingly, if zmin is specified at the same time, it works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the two px.imshow examples from the issue and compare the zmax behavior with and without np.nan. Locate the px.imshow implementation and its existing tests, then add coverage showing that zmax=2 remains effective for data containing np.nan; the issue is done when that regression passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, pandas, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100