Skip to content

Commit

Permalink
fix: method not accepting None being called with None.
Browse files Browse the repository at this point in the history
matplolib `Axes.set_xlabel` does not support `None` as the first parameter.
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.set_xlabel.html
  • Loading branch information
mbelak-dtml committed Jul 31, 2023
1 parent e049373 commit aedf276
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions edvart/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ def scatter_plot_2d(
if interactive:
fig.show()
else:
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
if xlabel is not None:
ax.set_xlabel(xlabel)
if ylabel is not None:
ax.set_ylabel(ylabel)
if not show_xticks:
ax.set_xticks([])
if not show_yticks:
Expand Down

0 comments on commit aedf276

Please sign in to comment.