Skip to content

CoordinateRect: add constructor overload that accepts IAxes #3985

@swharden

Description

@swharden

This works:

CoordinateRect rect = new(Axes.XAxis.Range, Axes.YAxis.Range);

but it would be nice to be able to do this:

CoordinateRect rect = new(Axes); // where Axes is a class that implements IAxes

The new constructor can be added below this line

public CoordinateRect(double x1, double x2, double y1, double y2)
{
XMin = Math.Min(x1, x2);
XMax = Math.Max(x1, x2);
YMin = Math.Min(y1, y2);
YMax = Math.Max(y1, y2);
ThrowIfNanOrInfinity();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis issue has limited complexity and may be a good start for new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions