Skip to content

Commit

Permalink
Remove use of matplotlib's get_offset_position
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilGirdhar committed Oct 4, 2023
1 parent 294d743 commit 3cd8144
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ def draw_collection(
"zorder": collection.get_zorder(),
}

# TODO: When matplotlib's minimum version is bumped to 3.8, this can be
# simplified since collection.get_offset_position no longer exists.
offset_dict = {"data": "before", "screen": "after"}
offset_order = offset_dict[collection.get_offset_position()]
offset_order = (offset_dict[collection.get_offset_position()]
if hasattr(collection, "get_offset_position")
else "after")

self.renderer.draw_path_collection(
paths=processed_paths,
Expand Down

0 comments on commit 3cd8144

Please sign in to comment.