Skip to content

Conflict between norm and log_scale in 2d histplot #3875

@bskubi

Description

@bskubi

Using Seaborn 0.13.2, I am trying to create a seaborn 2d histplot with a log colorscale as well as a log scale on the y axis:

import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm

mean = [0, 10]
cov = [[1, 0], [0, 50]] 
x, y = np.random.multivariate_normal(mean, cov, 5000).T

fig, ax = plt.subplots(figsize=(8, 7))

sns.histplot(
    x=x, 
    y=y, 
    log_scale = (False, True),
    norm=LogNorm(),
    ax=ax
)

However, this results in the error:

ValueError: Passing a Normalize instance simultaneously with vmin/vmax is not supported.  Please pass vmin/vmax directly to the norm when creating it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions