Skip to content

[MNT]: Scale val_in_range method #31286

@scottshambaugh

Description

@scottshambaugh

Summary

From @timhoffm's comment: #31061 (comment)

Should we grow a method Scale.val_in_range(val). This seems like a logically meaningful API. ScaleBase could implement this as a generic fallback via limit_range_for_scale to support existing third-party scales. But specific scales could implement their logic much more efficiently; e.g. LinearScale would just return True, and LogScale would return val > 0.

Should be cleaner logic and faster computation.

Proposed fix

Implement and update Axes._point_in_data_domain to use it.

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