-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Hook up ticksize attribute for Axis3 #2354
Conversation
Thanks for getting this rolling :) the thing is that you hooked up an implementation that I didn't want to keep, because it's just a hack to get ok looking ticks by default as the ticks are tied to the axis length. This way I could draw them in data coordinates. But really, they should be drawn in screen coordinates so we can give them proper screen based lengths which are then comparable to Axis. |
I swear I read your comment in the issue ... but then I must have become too excited once I figured out where to put the ticksize, so I ignored it hahaha :) I can take a look at that over the weekend. |
No worries, it would be cool if you could get it to work! The Axis3 code is always a bit more complex because of the three dimensions plus rotations that mean you have to think more abstractly about where things end up visually.. |
I pushed something that works locally for me. I kicked out the |
Seems to work well! What's the 10000 constant in there? I don't remember why I set the z the way I did at the time, even with the comment explaining it. Maybe it was just for the case when the ticks go inward, otherwise the plot shouldn't overlap them no? |
And I think the |
The Makie.jl/src/makielayout/blocks/axis3d.jl Lines 452 to 460 in c8a36f3
Ok, I can fix that later. |
I think the tick placement needs more tuning, because if you look close you can see that the ticks don't exactly align with the grid lines (the x ticks show the biggest difference). This issue was already there before this PR. I could not figure out the problem right now. I will have to take a closer look again tomorrow. |
Sorry for the delay, but I was busy in the past week ... I took at look this again. I checked that the endpoints of the grid lines agree with the ends of the tick lines we draw -- they are correct. Makie.jl/src/camera/projection_math.jl Lines 300 to 306 in e0cb400
return (((p .+ 1f0) ./ 2f0) .* (resolution .- 1f0)) .+ 0.5f0 then things look much better: Q: What is the logic behind this line? I am having a difficult time determining whether the factor |
Huh I feel like I debugged a similar off by a pixel projection bug in CairoMakie a long time ago. |
Maybe the grid lines are just moved down a tiny bit, I did something like that to improve z fighting issues but maybe I just moved the panels back a little bit and not the grid lines. |
That was also my first idea. Regarding the |
I couldn't find an issue or PR in this repo, but I would like to see what your reasoning was there back then. Could you maybe try to dig it up for me? |
The ~0.5 pixel offset seems like it's not a regression from this PR, so I think it shouldn't hold up merging the PR! |
yeah if that's the only thing, let's merge for now |
Missing reference imagesFound 1 new images without existing references. |
Description
Implements #2339
MWE
Type of change
Checklist