Skip to content

Fixed colorbar positioning with tight layout#7

Open
lukasmu wants to merge 1 commit intotomkwok:masterfrom
lukasmu:master
Open

Fixed colorbar positioning with tight layout#7
lukasmu wants to merge 1 commit intotomkwok:masterfrom
lukasmu:master

Conversation

@lukasmu
Copy link
Copy Markdown

@lukasmu lukasmu commented Mar 15, 2021

This should fix #4.
The issue seems to be that plt.tight_layout() and fig.subplots_adjust() do not work well with each other.

I have to admit it's not the most beautiful code, but it seems to work fine.

Resulting in:
image
Instead of:
image

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@tomkwok
Copy link
Copy Markdown
Owner

tomkwok commented Mar 16, 2021

Thanks for the suggestion. Do you use Windows or Linux? I am looking for a way to produce correctly aligned/padded plots on all platforms without resorting to using OS detection hacks. With your patch applied the plots generated on macOS would not be correctly positioned.

@lukasmu
Copy link
Copy Markdown
Author

lukasmu commented Mar 16, 2021

Oh weird, I didn't know that there are such differences between OSes.
I used Ubuntu for this.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

Image left shifted

2 participants