Skip to content

Conversation

@chantakan
Copy link

Summary

This PR fixes the behavior of negative tick_mark_size values. Previously, using a negative value caused labels and axis descriptions to move inside the plot area, overlapping with the chart content.

Expected Behavior (after this fix)

When using negative tick_mark_size, only the tick marks should point inward (into the plot area), while labels remain outside. This matches the expected behavior similar to matplotlib's ax.tick_params(direction='in').

Previous Behavior (bug)

  • Labels moved into the plot area
  • Axis descriptions overlapped with numeric labels
  • White label backgrounds hid grid lines

Changes

  • Labels are now always positioned outside the plot area regardless of tick direction
  • Axis lines are always drawn on the outer edge
  • Inward tick marks are drawn on the plot area using strip_coord_spec()
  • Outward tick marks continue to work as before

Testing

  • All 81 unit tests pass
  • All 49 doc tests pass
  • Visually verified with test examples

Fixes #716

@chantakan
Copy link
Author

Screenshots

Before (bug): Labels move inside with negative tick_mark_size

test_inward_ticks_before

After (fix): Only tick marks point inward, labels stay outside

test_inward_ticks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Negative tick_mark_size moves labels into plot area instead of only changing tick direction

1 participant