Skip to content

Commit

Permalink
fix sticky edges, use 'mirror' mode of get_lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ksunden committed Aug 16, 2024
1 parent f0fabc1 commit 25d39f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions data_prototype/artist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from bisect import insort
from collections import namedtuple
from typing import Sequence

import numpy as np
Expand Down Expand Up @@ -234,6 +235,7 @@ def __init__(self, axes):
self.figure = None
self._clippath = None
self.zorder = 2
self.sticky_edges = namedtuple("Sticky", ["x", "y"])([], [])

@property
def axes(self):
Expand Down
6 changes: 5 additions & 1 deletion data_prototype/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ def scatter(

def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)
line_args = [*self._get_lines_mirror(self, *args, data=data, **kwargs)]
line_args = [
*self._get_lines_mirror(
self, *args, data=data, **kwargs, return_kwargs=True
)
]
print(line_args)
lines = []
for coord, kws in line_args:
Expand Down

0 comments on commit 25d39f2

Please sign in to comment.