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

Visualisation ax,cb = mgr.showResult() undersizes plot and oversizes colorbar, changing aspect not effective #634

Open
sarahgarre opened this issue Dec 15, 2023 · 1 comment
Assignees

Comments

@sarahgarre
Copy link

image

@halbmy halbmy self-assigned this Dec 15, 2023
@halbmy
Copy link
Contributor

halbmy commented Dec 15, 2023

You should better write how you achieved this result, I guess:

ax, cb = *show*()  # e.g. pg.show(), mgr.showResult() etc.
ax.set_aspect(3.0)

which is indeed a bug, rather one of matplotlib (e.g. see https://stackoverflow.com/questions/63118710/how-to-set-matplotlib-colorbar-height-for-image-with-aspect-ratio-1)

If you don't care about the actual aspect, but want to fill the figure, you can use ax.set_aspect('auto'), but if you want to use a specific aspect, the figure is ugly unless you adjust the cb aspect too (which is 'auto' by default) by, e.g., cb.ax.set_aspect(0.5).

We should better (re)include aspect as a keyword argument in pg.show() and change the aspect of the colour scale accordingly.

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

No branches or pull requests

2 participants