I have a problem trying to capture an animation using a pygmt figure object and the Celluloid package (celluloid package website). When I try to put the normal celluloid code around a pygmt figure, it has trouble finding the figure axes:
---> 563 camera.snap() 564 ~/anaconda3/envs/obspy/lib/python3.7/site-packages/celluloid.py in snap(self) 28 """Capture current state of the figure.""" 29 frame_artists: List[Artist] =  ---> 30 for i, axis in enumerate(self._figure.axes): 31 if axis.legend_ is not None: 32 axis.add_artist(axis.legend_) AttributeError: 'Figure' object has no attribute 'axes'
My figure does work normally without the celluloid package and I just initialize it in a normal way using:
fig = pygmt.Figure()
Does anyone have experience with how to extract the axes or does anyone have another easy way to animate a pygmt figure in a loop?
Thanks in advance!