Skip to content

[Doc]: More consistent documentation of margins #20984

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

Open
timhoffm opened this issue Sep 2, 2021 · 3 comments
Open

[Doc]: More consistent documentation of margins #20984

timhoffm opened this issue Sep 2, 2021 · 3 comments

Comments

@timhoffm
Copy link
Member

timhoffm commented Sep 2, 2021

Documentation Link

https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.margins.html

Problem

From #20942 (comment):

Axes.margins is not quite clear.

Suggested improvement

Actions:

Matplotlib Version

3.4.x

Matplotlib documentation version

3.4.x

@Bustead
Copy link

Bustead commented Sep 12, 2023

@timhoffm just checking if there is a reason this issue is still open? If you want me to tackle anything happy to help.

@timhoffm
Copy link
Member Author

@Bustead the issue is still present. Nothing has been changed since I've opened it. The proposed actions are listed above.

@timhoffm
Copy link
Member Author

Note to self: Margins define the extra space we want to have around the data. They are in fraction of the data range. This is similar but not exactly the same as "Axes units". When we have a data range of 1 and margins=0.1. The xrange will be 0.1 + 1 + 0.1 = 1.2; i.e. the left-most data is 0.1*1.2 = 0.12 in axes units away from the border.

Possibly a picture would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants