Skip to content

Commit 799d188

Browse files
committed
update lissajous example for changes on main
1 parent 610a02b commit 799d188

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

data_prototype/wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def _update_wrapped(self, data):
224224

225225
class PathCollectionWrapper(ProxyWrapper):
226226
_wrapped_class = _PathCollection
227+
required_keys = {"x", "y", "paths", "facecolors", "edgecolors", "sizes"}
227228
_privtized_methods = (
228229
"set_facecolors",
229230
"set_edgecolors",
@@ -250,7 +251,6 @@ def draw(self, renderer):
250251
return self._wrapped_instance.draw(renderer)
251252

252253
def _update_wrapped(self, data):
253-
print(data)
254254
self._wrapped_instance.set_offsets(np.array([data["x"], data["y"]]).T)
255255
self._wrapped_instance.set_paths(data["paths"])
256256
self._wrapped_instance.set_facecolors(data["facecolors"])

examples/lissajous.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import matplotlib.markers as mmarkers
1818
from matplotlib.animation import FuncAnimation
1919

20-
from data_prototype.containers import _Transform, Desc
20+
from data_prototype.containers import _MatplotlibTransform, Desc
2121

2222
from data_prototype.wrappers import PathCollectionWrapper, FormatedText
2323

@@ -41,7 +41,7 @@ def describe(self):
4141

4242
def query(
4343
self,
44-
transform: _Transform,
44+
transform: _MatplotlibTransform,
4545
size: Tuple[int, int],
4646
) -> Tuple[Dict[str, Any], Union[str, int]]:
4747
def next_time():
@@ -72,7 +72,7 @@ def update(frame, art):
7272

7373
fc = FormatedText(
7474
sot_c,
75-
"ϕ={phase:.2f} ".format,
75+
{"text": lambda phase: f"ϕ={phase:.2f} "},
7676
x=1,
7777
y=1,
7878
ha="right",

0 commit comments

Comments
 (0)