Skip to content

Commit

Permalink
style(plot_counter): simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
nstarman committed Jan 28, 2024
1 parent b7d3d5e commit 6db3799
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/galax/extensions/matplotlib/_mpl_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,19 @@ def plot_contours(
)
raise ValueError(msg)

kwargs = {
"ax": ax,
"grids": _grids,
"slices": _slices,
"labels": labels,
"kwargs": kwargs,
}

if ndim == 1:
_plot_countours_1d(
pot, t, ax=ax, grids=_grids, slices=_slices, labels=labels, kwargs=kwargs
)
_plot_countours_1d(pot, t, **kwargs)

else:
_plot_countours_2d(
pot,
t,
ax=ax,
grids=_grids,
slices=_slices,
labels=labels,
filled=filled,
kwargs=kwargs,
)
_plot_countours_2d(pot, t, **kwargs, filled=filled)

return fig

Expand Down

0 comments on commit 6db3799

Please sign in to comment.