Skip to content

bugfix 2d tile depth #128

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

Merged
merged 6 commits into from
Apr 22, 2025
Merged

bugfix 2d tile depth #128

merged 6 commits into from
Apr 22, 2025

Conversation

rafaqz
Copy link
Collaborator

@rafaqz rafaqz commented Dec 31, 2024

This PR fixes the ice melt demo so that the simulation is seen, and various z level plots behave well like they did previously.

It splits up depth scaling into plots above and below z level, and uses visible=false/ visible=true as well as depth so that the top layer is always at zero, and the background is either below it how hidden if it has a higher zoom.

It also moves the whole plot down by 10 so none of this jiggling around affects other plots.

And reorganises code a little.

src/map.jl Outdated
@@ -205,7 +205,7 @@ function setup_axis!(axis::Axis, ext_target, crs)
X = ext_target.X
Y = ext_target.Y
axis.autolimitaspect = 1
Makie.limits!(axis, (X[1], X[2]), (Y[1], Y[2]))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops this is just to fix the other bug that hangs vscode, but should be removed

@@ -126,7 +147,7 @@ function cull_plots!(m::Map)
end
end

function create_tile_plot!(m::AbstractMap, tile::Tile, data)
function create_tyler_plot!(m::AbstractMap, tile::Tile, data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to self: we need to document this name change and apply it to the GeoMakie extension + all other Tyler plot configs

Copy link
Collaborator Author

@rafaqz rafaqz Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh is this interface? Need to make that clear.

It can be some other name but there is already create_tileplot without underscore in the interface

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, and the GeoMakie extension is using create_tileplot which is different from this create_tile_plot function. Let's keep create_tyler_plot.

end
end

move_z(m::AbstractMap, plot, tile::Tile, bounds::Rect3) = nothing
function move_z(m::AbstractMap, plot, tile::Tile, bounds::Rect2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be for ImageData - we can't be doing this with Map3d or surface, for example, or the meshscatter configs...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get what we should do differently here.

@lazarusA
Copy link
Collaborator

@rafaqz @asinghvi17 tests are passing now and preview docs are also available. Didn't test locally, so I'm not sure if it addresses all glitches.

@asinghvi17
Copy link
Member

Sweet...thanks! Will play around with this and test.

@lazarusA
Copy link
Collaborator

Ok, all examples seem to work now in the docs preview. I will merge as is. Also, tested ice melt demo locally, and points are shown at the top, as they should.

@lazarusA lazarusA merged commit fa5a4cd into master Apr 22, 2025
4 checks passed
@lazarusA lazarusA deleted the bugfix_depth branch April 22, 2025 12:39
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.

3 participants