Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
The call signature onget_window_extent
is not uniform, we should probably fix this.
tcaswell@eowyn:lib$ ack-grep 'def get_window_extent'mpl_toolkits/axisartist/axis_artist.py437: def get_window_extent(self, renderer):625: def get_window_extent(self, renderer):806: def get_window_extents(self, renderer):matplotlib/axes/_base.py473: def get_window_extent(self, *args, **kwargs):matplotlib/artist.py190: def get_window_extent(self, renderer):matplotlib/lines.py531: def get_window_extent(self, renderer):matplotlib/image.py1097: def get_window_extent(self, renderer=None):matplotlib/text.py763: def get_window_extent(self, renderer=None, dpi=None):1285: def get_window_extent(self, renderer=None):2088: def get_window_extent(self, renderer=None):matplotlib/figure.py490: def get_window_extent(self, *args, **kwargs):matplotlib/offsetbox.py252: def get_window_extent(self, renderer):618: def get_window_extent(self, renderer):769: def get_window_extent(self, renderer):884: def get_window_extent(self, renderer):1058: def get_window_extent(self, renderer):1265: def get_window_extent(self, renderer):matplotlib/patches.py490: def get_window_extent(self, renderer=None):matplotlib/legend.py798: def get_window_extent(self, *args, **kwargs):matplotlib/table.py288: def get_window_extent(self, renderer):matplotlib/collections.py207: def get_window_extent(self, renderer):
- for
Axes
andFigure
the arguments are ignored, in legend they are passed through toPatch
's . These should probably be given explicit arguments. Text
effectively implements a context manager on thefigure.dpi
. From the doc-string this seems like it is for making image maps for web images easy, but there has to be a better way to do this.- if we are going to let artists cache the renderer, it should happen at the artist level, not on a per-subclass basis