Skip to content

[Bug]: Hexbin gridsize interpreted differently for x and y #21349

@timhoffm

Description

@timhoffm

Bug summary

gridsize results in 2x the expected number of elements in y-direction

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np

np.random.seed(19680801)
n = 100000
x = np.random.standard_normal(n)
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)

fig, ax = plt.subplots(figsize=(6, 6))
h = ax.hexbin(x, y, gridsize=(10, 10), marginals=True, reduce_C_function=np.sum)

Actual outcome

grafik

Expected outcome

grafik

This image was taken with gridsize=(10, 5) but should be the result of gridsize=(10, 10).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy