Skip to content

[MNT]: Deprecate hexbin marginals? #21353

Closed

Description

@dstansby

Summary

hexbin() has the option to display 1D marginals along the x- and y-axes. This is a bit of an oddity within Matplotlib - we don't support automatic marginals for pcolormesh, imshow etc. In addition there are lots of possible issues with the current implementation (#21349, and the list at #18875), which are a maintenance burden.

I would like to propose deprecating and removing support for automatic marginals in hexbin. Instead we can provide an example showing how to add marginals on separate axes for a range of 2D plots, and/or point to higher level libraries that build upon Matplotlib that provide automatic marginal functionality.

Proposed fix

No response

Activity

  1. jklymak commented on Oct 14, 2021

    @jklymak
    Member

    I think I agree with the general premise that we probably shouldn't have had these in the first place, but now that they are there, are they worth deprecating?

    I think the only inconsistency is with hist2d not providing marginals. I don't think that pcolormesh or imshow have any inherent binning in them that marginals would be desired for. I am pretty sure we have a marginals example for hist2d though it is implemented as histograms, not colored strips.

  2. timhoffm commented on Oct 14, 2021

    @timhoffm
    Member

    If marginals is a reasonably working feature, I'd leave it as is even if we wouldn't add it nowadays.
    Note that #21349 is not about marginals. So the question is: are the issues #18875 and the added code complexity worth the effort on our side to deprecate, remove and provide alternative examples and the burden on the user side to switch away from marginals?

  3. dstansby commented on Dec 21, 2021

    @dstansby
    MemberAuthor

    Since I'm neutral, and there are two in favour of keeping, I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions