Skip to content

zmax argument not effective in px.imshow when img contains np.nan #4299

Open
@ChiQiao

Description

@ChiQiao

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)

image

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)

image

When df contains np.nan, zmax is not taking effect. Intesrestingly, if zmin is specified at the same time, it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions