Skip to content

Commit fdebd4f

Browse files
authored
Bunch of bugfixes
1 parent cf48ae5 commit fdebd4f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

yaptool.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def legend(ax: plt.Axes,
349349
leg = ax.legend(loc=loc, fontsize=fontsize, frameon=frame, **kwargs)
350350

351351
# Automatically set correct alpha for legend symbols
352-
for legend_handle in leg.legendHandles:
352+
for legend_handle in leg.legend_handles:
353353
legend_handle.set_alpha(1)
354354

355355

@@ -426,7 +426,10 @@ def ticklabelsize(ax: plt.Axes, which: str = "both", size: float = 30) -> None:
426426
if not hasattr(ax, 'plot'):
427427
raise ValueError("Pass a valid plot in parameter ax.")
428428

429-
ax.tick_params(which, labelsize=size)
429+
if which in ["x", "xy", "yx", "both"]:
430+
ax.tick_params("x", labelsize=size)
431+
if which in ["y", "xy", "yx", "both"]:
432+
ax.tick_params("y", labelsize=size)
430433

431434

432435
def limits(ax: plt.Axes,

0 commit comments

Comments
 (0)