Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop axes labels being hidden by the plot window #34907

Merged
merged 5 commits into from
Jan 13, 2023

Conversation

jhaigh0
Copy link
Contributor

@jhaigh0 jhaigh0 commented Jan 6, 2023

Description of work.

This PR fixes the bug where the axes labels of a plot could be hidden outside the edge of the plot window after resizing.

To test:

  • Load some data
  • Plot a spectrum
  • Play around with resizing the window and check that the axes labels remain visible up until matplotlib is forced to push them outside the window (almost minimum window size).
    • When this happens there should be one warning issued for horizontal and vertical limits respectively

It may be worth comparing to another branch to observe how it was problematic before.

Fixes #34049


Reviewer

Please comment on the following (full description):

Code Review
  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Are the release notes saved in a separate file, using Issue or PR number for file name and in the correct location?
Functional Tests
  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

@jhaigh0 jhaigh0 marked this pull request as ready for review January 9, 2023 13:26
@jhaigh0 jhaigh0 added the ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS label Jan 9, 2023
@jhaigh0 jhaigh0 added this to the Release 6.6 milestone Jan 12, 2023
@robertapplin robertapplin self-assigned this Jan 12, 2023
Copy link
Contributor

@robertapplin robertapplin left a comment

Choose a reason for hiding this comment

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

The axes labels are now visible up until the plot becomes very small. Just had one code question

@thomashampson thomashampson merged commit 967ee8c into main Jan 13, 2023
@thomashampson thomashampson deleted the 34049_hidden_axes_labels branch January 13, 2023 11:53
@martyngigg
Copy link
Member

martyngigg commented Jan 18, 2023

Just so we don't lose track. Is this the PR we need to revert to avoid the plot layout issues. I think we should do this before the beta goes out?

Release 6.6 bug fix issues: #34973 #34974

@martyngigg
Copy link
Member

We unfortunately can't just revert this PR as it's on main and it will revert other things like 6.7 release notes too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The X Axis Title of the graphs hides when we change size
4 participants