Skip to content

_path.get_path_collection_extents potentially wrong return value #1735

Closed

Description

@akhmerov

_path.get_path_collection_extents, when applied to a collections with offsets=[] treats the offsets as if they were [0, 0](this behavior is used in path.get_paths_extents).

This interpretation of an empty collection is error-prone, and caused #1490. Hence it would be desirable to decide what should path.get_path_collection_extents return when given an empty collection, and have path.get_path_extents not rely on current behavior.

This issue is created to not lose track of the bug, while closing #1490 and merging #1497.

Activity

  1. pelson commented on Feb 6, 2013

    @pelson
    Member

    @akhmerov - this is really nitty-gritty mpl. Do you have a proposed solution, or is this simply (a very useful) bug report?

    Cheers,

  2. akhmerov commented on Feb 6, 2013

    @akhmerov
    ContributorAuthor

    I personally think that raising a ValueError when the input collection is empty would be a good behavior of path.get_path_collection_extents. It is hard to track all the places where this might surfac, however there is no 'safe' output that would be guaranteed to be interpreted properly at every place.

  3. added this to the v1.4.x milestone on Aug 17, 2014
  4. modified the milestones: , v1.4.x on Feb 7, 2015
  5. modified the milestones: , on Jul 17, 2015
  6. modified the milestones: , on Oct 3, 2017
  7. github-actions commented on Mar 1, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  8. oscargus commented on Mar 1, 2023

    @oscargus
    Member

    I've rebased the PR deprecating passing an empty offset. #23200

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions