8000 [ENH]: AxLine xy1/xy2 setters should take xy as single parameters, (possibly) not separate ones · Issue #28800 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[ENH]: AxLine xy1/xy2 setters should take xy as single parameters, (possibly) not separate ones #28800
Closed
@anntzer

Description

@anntzer

Problem

Currently, AxLine.set_xy1 and set_xy2 take x and y as separate parameters. They should also take them as a single xy parameter, which is consistent with most other setters and would in particular allow the idiom line.set(xy1=..., xy2=...) (or line.set(xy1=..., slope=...).

Proposed solution

Given that the setters were only introduced only in Matplotlib 3.8, we could even consider just deprecating the split (x, y) form out and ultimately only supporting a single xy tuple (tagging this issue for 3.10 as we probably don't want to wait too long in that case); or we can support both forms with the standard dance present e.g. in Axes.set_xlim.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0