[Fix] Objects interface - use axis preconfigured label position #3696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #3614 describes an incorrect behavior of labeling/ticking of yaxis in the case of using secondary axis (through twin axes). In twin axes (instantiated through
ax.twin{x|y}
), the source axes are duplicated in a manner that makes one axis (for example xaxis) shared with the other (but its label is hidden), while the other axis is visible, but its ticks are plotted on the opposing side (for example yaxis using the right side for labeling and ticking). Prior to this PR, seaboard objects figure setup code assumes that yaxis uses the left side, and xaxis uses the bottom side.This PR changes the way plot setup is labeling/ticking the relevant axis, and pulls the label location information directly from the axis objects. This way, it correctly labels axis that already set the label to the opposing side (top/right; compared to the common bottom/left axis labeling).
Fixes #3614 (attached its reprex after this PR).