Skip to content

Commit

Permalink
Fixes for matplotlib 3.9 API (#8)
Browse files Browse the repository at this point in the history
* Fix "x must be a sequence"
* Fix for matplotlib 3.9.0 api change
  • Loading branch information
eltos authored Jun 3, 2024
1 parent 8711b55 commit 5dfdd81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xplt/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def register_matplotlib_options():
cmap_petroff_bipolar,
cmap_petroff_cyclic,
):
mpl.cm.register_cmap(cmap=cmap)
mpl.colormaps.register(cmap=cmap)
cmap_r = cmap.reversed()
cmap_r.name = cmap.name + "_r"
mpl.cm.register_cmap(cmap=cmap_r)
mpl.colormaps.register(cmap=cmap_r)


def register_pint_options():
Expand Down
2 changes: 1 addition & 1 deletion xplt/phasespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def update(self, particles, *, mask=None, masks=None, autoscale=False):

# 2D mean indicator (cross)
if self.artists_mean[i]:
self.artists_mean[i].set_data(XY0)
self.artists_mean[i].set_data(XY0.reshape([2,1]))
changed_artists.append(self.artists_mean[i])

# 2D size indicator (ellipses)
Expand Down

0 comments on commit 5dfdd81

Please sign in to comment.