From b32e3b9e43965ae70134ee22ffc659b6be61dafd Mon Sep 17 00:00:00 2001 From: Luke Davis Date: Tue, 17 Sep 2019 18:20:06 -0600 Subject: [PATCH 1/2] Initial pull request From b7e7625a2849d2b992bb5100db9aca12abaca9fe Mon Sep 17 00:00:00 2001 From: Luke Davis Date: Tue, 17 Sep 2019 18:25:32 -0600 Subject: [PATCH 2/2] Add colorbar, legend, and text methods to axes_grid as starting point --- proplot/subplots.py | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/proplot/subplots.py b/proplot/subplots.py index 81803163e..955d425ba 100644 --- a/proplot/subplots.py +++ b/proplot/subplots.py @@ -295,24 +295,20 @@ def _iterator(*args, **kwargs): # Mixed raise AttributeError(f'Found mixed types for attribute {attr!r}.') - # TODO: No more putting panels, legends, colorbars on the SubplotSpec. - # Put them in the margin, increase default space, and lock them to - # subplot bounds with locators, borrowing from axes_grid1 toolkit - # TODO: Consider adding Github issue, would be major API change. - # def colorbar(self, loc=None): - # """Draws a colorbar that spans axes in the selected range.""" - # for ax in self: - # pass - # - # def legend(self, loc=None): - # """Draws a legend that spans axes in the selected range.""" - # for ax in self: - # pass - # - # def text(self, loc=None): - # """Draws text that spans axes in the selected range.""" - # for ax in self: - # pass + def colorbar(self, loc=None): + """Draws a colorbar that spans axes in the selected range.""" + for ax in self: + pass + + def legend(self, loc=None): + """Draws a legend that spans axes in the selected range.""" + for ax in self: + pass + + def text(self, loc=None): + """Draws text that spans axes in the selected range.""" + for ax in self: + pass #-----------------------------------------------------------------------------# # Gridspec classes