Skip to content

heatmap(..., norm=None, ...) has different behaviour than without specifying the norm argument #3275

@stefanistrate

Description

@stefanistrate

Hi,

I'm noticing a strange behaviour when passing norm=None to a heatmap and I believe it's due to these lines:

seaborn/seaborn/matrix.py

Lines 299 to 303 in 3733590

# setting vmin/vmax in addition to norm is deprecated
# so avoid setting if norm is set
if "norm" not in kws:
kws.setdefault("vmin", self.vmin)
kws.setdefault("vmax", self.vmax)

Specifically, if I use sns.heatmap(..., vmin=0.0, vmax=1.0, ...) I get something like this:

without-norm

but when I use sns.heatmap(..., vmin=0.0, vmax=1.0, norm=None, ...), vmin and vmax are lost:

with-norm

I'm happy to send a PR if this issue isn't addressed anywhere.

Ștefan

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions