Skip to content

Commit

Permalink
Remove redundant logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sstendahl committed Nov 14, 2023
1 parent 808f687 commit 97b6209
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,11 @@ def items(self, items: list):
axis.get_xaxis().set_visible(False)
axis.get_yaxis().set_visible(False)
# Set tick where requested, as long as that axis is not occupied
if used: # (Or if frame)
axis.tick_params(which=ticks, **{
key: params[f"{'x' if i < 2 else 'y'}tick.{key}"]
and (key in directions or not visible_axes[i])
for i, key in enumerate(["bottom", "top", "left", "right"])
})
axis.tick_params(which=ticks, **{
key: params[f"{'x' if i < 2 else 'y'}tick.{key}"]
and (key in directions or not visible_axes[i])
for i, key in enumerate(["bottom", "top", "left", "right"])
})
for handle in axis.lines + axis.texts:
handle.remove()
axis_legend = axis.get_legend()
Expand Down

0 comments on commit 97b6209

Please sign in to comment.