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

Issue on page /examples/hi-res-2d-classes.html #88

Open
k-spoth opened this issue May 8, 2024 · 0 comments
Open

Issue on page /examples/hi-res-2d-classes.html #88

k-spoth opened this issue May 8, 2024 · 0 comments

Comments

@k-spoth
Copy link

k-spoth commented May 8, 2024

This is a super minor issue in the documentation. I used the following code from the page to add a scale bar to a micrograph:

ax.plot([N // 7, N // 7], [N / 2 + scale / 2, N / 2 - scale / 2], color="white")

I used a large linewidth and noticed the scalebar was too long! Pyplot's default behavior is to slightly extend the line around the two endpoints by the linewidth ("projecting" capstyle). I fixed the issue by specifying "butt" capstyle:

ax.plot([N // 7, N // 7], [N / 2 + scale / 2, N / 2 - scale / 2], color="white", solid_capstyle="butt")

Certainly in the 2D class example here the difference might only be one pixel, but this might keep someone else from having the same issue!

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

1 participant