Skip to content

Conversation

@Agent6-6-6
Copy link
Contributor

@robbievanleeuwen, I believe this addresses #188

I've only tested it briefly on a few examples where I previously had legend formatting issues since it was so intermittent

But I think the issue was calling tight_layout() after setting the aspect ratio for the plot did something weird for certain aspect ratio plots. Calling it beforehand seems to work as intended.

Copy link
Owner

@robbievanleeuwen robbievanleeuwen left a comment

Choose a reason for hiding this comment

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

Hi @Agent6-6-6 thanks for this, it's certainly an improvement on what's currently happening.

In some cases this cuts off the title of the plots, see some of the examples in the gallery that are built from this pull request. I think overall this is still better than what is currently happening where some legends and tick labels are cut off.

Could I get you to run black on the code so that its correctly formatted and I will merge.

Cheers!

@robbievanleeuwen robbievanleeuwen linked an issue Aug 1, 2022 that may be closed by this pull request
@Agent6-6-6
Copy link
Contributor Author

@robbievanleeuwen, are you just using the default line length in black (88 I think)?

Forgot I have it set to a slightly longer line length which reformatted a few longer lines, but will change and resubmit.

Hadn't noticed the title getting cutoff, will have a further play around after merging and see if that can be figured out.

@Agent6-6-6
Copy link
Contributor Author

@robbievanleeuwen, 5a336ab seems to fix the title cutting off on the examples. Just needed the title created prior to tight_layout().

Should be good to merge once the tests pass

@robbievanleeuwen robbievanleeuwen merged commit 359cc43 into robbievanleeuwen:master Aug 1, 2022
@robbievanleeuwen
Copy link
Owner

Great, thanks @Agent6-6-6!

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.

Default plot size cutting off wider plot legends

2 participants