From 677a57c67d20d39cbd3a24fb7d25ae7068cde4cb Mon Sep 17 00:00:00 2001 From: Sidharth Bansal <20972099+SidharthBansal@users.noreply.github.com> Date: Fri, 3 Apr 2020 01:26:47 +0530 Subject: [PATCH 1/3] Change the description of Rectangle's xy parameter matplotlib.patches.Rectangle's first parameter, xy, is previously only documented for data plotting functions in which xy means left and bottom coordinates. However, in imshow(), the vertical axis's direction is inverted, and xy means left and top coordinates. See #15401. In this PR, a fix is made to explain xy as starting coordinates so as to make it suitable for both cases Closes #15433 Taken things from #15433. --- lib/matplotlib/patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 396f316c3880..ce1b676bad18 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -720,7 +720,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs): Parameters ---------- xy : (float, float) - The bottom and left rectangle coordinates + The anchor coordinates width : float Rectangle width height : float From 290815d405e1b93599c3308a0c2692513358844f Mon Sep 17 00:00:00 2001 From: Sidharth Bansal <20972099+SidharthBansal@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:39:29 +0530 Subject: [PATCH 2/3] Increasing readability of comments --- lib/matplotlib/patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index ce1b676bad18..bf4856d3feab 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -720,7 +720,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs): Parameters ---------- xy : (float, float) - The anchor coordinates + The rectangle extends from xy[0] to xy[0] + width in x-direction and from xy[1] to xy[1] + height in y-direction. width : float Rectangle width height : float From d8561bd335ef490095e58310d83960286beab4b7 Mon Sep 17 00:00:00 2001 From: Sidharth Bansal <20972099+SidharthBansal@users.noreply.github.com> Date: Fri, 3 Apr 2020 22:40:26 +0530 Subject: [PATCH 3/3] Divided comment across 2 lines to pass Travis --- lib/matplotlib/patches.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index bf4856d3feab..d7b326bb01a8 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -720,7 +720,8 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs): Parameters ---------- xy : (float, float) - The rectangle extends from xy[0] to xy[0] + width in x-direction and from xy[1] to xy[1] + height in y-direction. + The rectangle extends from xy[0] to xy[0] + width in + x-direction and from xy[1] to xy[1] + height in y-direction. width : float Rectangle width height : float