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

bounding box cuts off nodes #173

Closed
SimonEnsemble opened this issue Feb 25, 2024 · 3 comments
Closed

bounding box cuts off nodes #173

SimonEnsemble opened this issue Feb 25, 2024 · 3 comments

Comments

@SimonEnsemble
Copy link

SimonEnsemble commented Feb 25, 2024

the automatic determination of x- and y-lims tends to cut off my (big) nodes.

would be nice if there were a padding feature to add padding to the x- and y-lims to expand the bounding box.
(I'm making many such figures so manual tuning of axes not acceptable.)

oddly I get the following values for the automatically determined x, y-axis limits (which I seek to modify) for this plot. the y-axis limits are clearly incorrect.

ax.yaxis.attributes.limits[] = (0.0f0, 10.0f0)
ax.xaxis.attributes.limits[] = (0.0f0, 10.0f0)
Screenshot 2024-02-25 at 10 15 34 AM

another posting a similar issue here.

@SimonEnsemble
Copy link
Author

so bizarre. the yaxis limits are not being retrieved inside the function. but outside the function they are.

Screenshot 2024-02-25 at 10 38 08 AM

@asinghvi17
Copy link
Member

As to the last post, final limits are always computed at display time. You can run Makie.update_state_before_display!(fig) to make them compute limits, though.

@hexaeder
Copy link
Collaborator

I'll close this issue as a duplicate of #141.

I think the underlying issue is that the Makie limit calculation does not take things into account that are drawn in pixel space rather than data space, i.e., elements that are displayed at the same size regardless of zoom level. Calculating proper limits is nontrivial since the limits affect the zoom level and, therefore, the projection of the pixel-space objects into data space.

This discourse post might help you to define a function to fix the limits after plotting.

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

3 participants