Skip to content

Commit d9e917f

Browse files
committed
update docs
1 parent 064850b commit d9e917f

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
77

88
### Added
99
- new artists submodule `animate` as a convenient wrapper for matplotlib's `FuncAnimate`
10+
- `animate.animate2D`: allows versatile conversion of data to animation.
11+
- `animate.animate_interact2D`: create an animation from an interact2D object.
12+
- `animate.animate_quick2D`: create an animation whose frames are the figures that would be created in a quick2D call
1013

1114
### Changed
1215
- `interact2D`: replaced SimpleNamespace object with a dataclass for more explicit typing
16+
- `quick2D`: `__iter__` method added which modifies the same figure over and over instead of writing new figures for each chop object
1317

1418
### Fixed
1519
- WrightTools works with new h5py 3.16

WrightTools/artists/_animate.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,23 @@ def animate_quick2D(data, *args, **kwargs):
133133
"""
134134
animate a quick2D series
135135
136-
function accepts same arguments as Quick2D
136+
function accepts same arguments as artists.Quick2D
137137
138138
animation kwargs can be passed through a dictionary `fa_kwargs`
139+
140+
unlike other animation functions, this enforces repeat=False
139141
"""
140142

143+
# trying for minimal code here, and just drawing from quick2D's constructs
144+
# quick2D is constructed as a generator, so looping and reversing is
145+
# not simple to implement
141146
fa_kwargs = kwargs.pop("fa_kwargs", dict())
142147
q2d = _quick2D(data, *args, **kwargs)
143148
generator = q2d.__iter__()
144149
fig = generator.__next__()
145-
print(q2d.nfigs)
146150

147151
def updater(frame):
148-
print(f"{frame=}")
152+
logger.info(f"{frame=}")
149153
generator.__next__()
150154
fig.canvas.draw_idle()
151155
return

0 commit comments

Comments
 (0)