Skip to content

Conversation

@cvanelteren
Copy link
Collaborator

This commit introduces a major refactoring of the tick and label sharing mechanism in UltraPlot.

The previous implementation had complex and distributed logic for determining tick and label visibility, which was difficult to maintain and extend. This refactoring centralizes the logic within the Figure class, making it more robust and easier to understand.

Key changes:

  • A new _share_ticklabels method in Figure now handles all tick label sharing.
  • The _get_border_axes method has been improved to be more accurate.
  • The _Crawler utility in ultraplot/utils.py has been rewritten to better handle complex layouts with panels and mixed axes types.
  • Redundant and complex logic has been removed from CartesianAxes, GeoAxes, and other modules.

This commit introduces a major refactoring of the tick and label sharing mechanism in UltraPlot.

The previous implementation had complex and distributed logic for determining tick and label visibility, which was difficult to maintain and extend. This refactoring centralizes the logic within the `Figure` class, making it more robust and easier to understand.

Key changes:
- A new `_share_ticklabels` method in `Figure` now handles all tick label sharing.
- The `_get_border_axes` method has been improved to be more accurate.
- The `_Crawler` utility in `ultraplot/utils.py` has been rewritten to better handle complex layouts with panels and mixed axes types.
- Redundant and complex logic has been removed from `CartesianAxes`, `GeoAxes`, and other modules.
return row1, row2, col1, col2

def _get_grid_span(self, hidden=False) -> (int, int, int, int):
def _get_grid_span(self, hidden=True) -> (int, int, int, int):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this default change?

Copy link
Collaborator

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question. Also there are other PRs that depend on this one and so it may be best to merge this first. Finally, the image comparison tests are failing.

@beckermr
Copy link
Collaborator

I looked at some of the test failures and they definitely need to be fixed in some cases.

@cvanelteren
Copy link
Collaborator Author

This PR is not needed anymore after #372

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.

2 participants