Inherit OffsetBox.get_window_extent. · matplotlib/matplotlib@2b50a5c · GitHub
Skip to content

Commit 2b50a5c

Browse files
committed
Inherit OffsetBox.get_window_extent.
Adjust OffsetBox.get_window_extent to use get_extent (which is typically redefined in subclasses) instead of get_extent_offsets (which is not), and make it check whether the current class' get_offset takes any arguments or not (which is not consistent, but fixing that requires some backcompat work). Also set the offset-getter of AnchoredOffsetbox as a fixed method on the class, rather than dynamicaly setting in that class' get_extent_offset. These changes then let us inherit the implementation of OffsetBox.get_window_extent across most subclasses instead of having to copy-paste it again and again.
1 parent 5c45952 commit 2b50a5c

1 file changed

Lines changed: 13 additions & 54 deletions

File tree

lib/matplotlib/offsetbox.py

Lines changed: 13 additions & 54 deletions

0 commit comments

Comments
 (0)