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

Pyramid rewrite #13

Closed
wants to merge 1 commit into from
Closed

Pyramid rewrite #13

wants to merge 1 commit into from

Conversation

Jufevic
Copy link
Contributor

@Jufevic Jufevic commented Jul 4, 2021

Hello again!

Rewrite of the pyramid example

When I looked at the code in pyramid.py, I saw you struggled with the arguments of the fig.add_axes function. Because the dimensions [left, bottom, width, height] of the new axes are in fractions of figure width and height. Your code performs complex calculations for determining the proper values of left, bottom, width and height.
What if we could position the inset images of the zernike polynomials directly at their right position (m, n)?
Using the function inset_axes, it is possible to use an absolute position instead of a position relative to the main figure. This massively simplifes your code.
You can learn more about the inset_axes function here

Pyramid image

pyramid_zernike

@Jufevic Jufevic marked this pull request as draft January 18, 2022 05:59
@Jufevic Jufevic closed this Jan 18, 2022
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.

None yet

1 participant