Skip to content

Rectangle patch constructor fails with units #5421

Closed
@TD22057

Description

@TD22057

Using unit'ized inputs in Rectangle fails in the constructor:

    File "test_units_patches.py", line 23, in test_units_rectangle
        p = mpatches.Rectangle( ( 5*U.km, 6*U.km ), 1*U.km, 2*U.km )
    File "/home/trd/git/TD22057/matplotlib/build/lib.linux-x86_64-2.7/matplotlib/patches.py", line 639, in __init__
        self._x = float(xy[0])
    TypeError: float() argument must be a string or a number

This is a new problem with 1.5.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions