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

Polar axis broken in patch release #3248

Closed
juliohm opened this issue Sep 23, 2023 · 5 comments
Closed

Polar axis broken in patch release #3248

juliohm opened this issue Sep 23, 2023 · 5 comments
Labels

Comments

@juliohm
Copy link
Member

juliohm commented Sep 23, 2023

Something changed besides the order of arguments (should have been released as a minor release), which broke our recipes:

https://juliaearth.github.io/GeoStatsDocs/stable/variography/empirical.html#Varioplanes

The previous version of Makie.jl was working fine:

https://juliaearth.github.io/GeoStatsDocs/v0.44/variography/empirical.html#Varioplanes

Our recipe is here, it calls Makie.surface and Makie.lines with polar coordinates:

https://github.com/JuliaEarth/GeoStats.jl/blob/338127cf188fa7a769eb44549ad07633b23741d1/ext/variogram.jl#L119-L130

What do we need to change to reproduce the old visualization?

@juliohm juliohm added the bug label Sep 23, 2023
@juliohm
Copy link
Member Author

juliohm commented Sep 23, 2023

Swapping the order of arguments doesn't solve the problem:

image

@ffreyer
Copy link
Collaborator

ffreyer commented Sep 23, 2023

We noted in the docs that PolarAxis is currently experimental and open to breaking changes which is why we pushed this through in a patch release.

I can reproduce the old docs example with

ax.theta_as_x[] = false
reset_limits!(ax)

I think that means you're missing something when swapping your arguments (maybe a transpose on z?).

@juliohm
Copy link
Member Author

juliohm commented Sep 23, 2023

Thank you for the quick fix. Transposing the matrix Z did the trick. I personally like the old visualization more:

image

Hiding the grid lines makes it a bit difficult to find the radius.

@juliohm juliohm closed this as completed Sep 23, 2023
@ffreyer
Copy link
Collaborator

ffreyer commented Sep 23, 2023

I personally agree, but it's inconsistent with Axis so we adjusted that. You can tweak the recipe to have the surface plot below the grid lines with a on(z -> translate!(surface_plot, 0, 0, -maximum(z) -100 -1), surface_z). (maximum to move the surface plot to 0 max z, -100 from ax.gridz and another -1 to avoid z-fighting).

Btw that docs page crashes for me after a short while. I'm guessing that's a problem with WGLMakie/JSServe? (ubuntu firefox)

@juliohm
Copy link
Member Author

juliohm commented Sep 23, 2023

It never crashed for me, but we are considering using CairoMakie.jl in the docs to avoid heavy loading.

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

No branches or pull requests

2 participants