MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.41k stars 311 forks source link

Why the Axises of my 3D contour figure didn't display as the axises data #3750

Open crazyfireji opened 7 months ago

crazyfireji commented 7 months ago

As the title, I plot a 3D contour using contour, and my y axis data is distributed as exp. The axises distribution as the first fig, but it doesn't work is 3D contour.

contourf(xx,yy,px[:,:,193]) image

This is my code: `f = Figure(size = (550, 500)) ax = Axis3(f[1,1], xlabel = L"x ", ylabel = L"y", zlabel = L"z", aspect=:data, ) contour!(ax, xx, yy, zz, px[:,:,:] ,levels=30:10:30)

display(f)` image

jkrumbiegel commented 7 months ago

I don't understand the issue, yet. Could you prepare an MWE that shows it, which we can easily reproduce?

crazyfireji commented 7 months ago

I don't understand the issue, yet. Could you prepare an MWE that shows it, which we can easily reproduce?

the red line is 3D contour should align with red lines of 2D surface my code f = Figure(size = (550, 500)) ax = Axis3(f[1,1], aspect=:data,) contour!(ax, x, y, z, px, levels=25:10:30) surface!(ax, x, y, zero(px[:,:,1]),color=p[:,:,1], transformation=(:xy, 0)) display(f) image

jkrumbiegel commented 7 months ago

I don't have your data, so I cannot reproduce. An MWE must be executable for me

asinghvi17 commented 7 months ago

Are you using CairoMakie for this @crazyfireji? If so, you might have better outputs using GLMakie, since CairoMakie is not built for 3D.

crazyfireji commented 7 months ago

Are you using CairoMakie for this @crazyfireji? If so, you might have better outputs using GLMakie, since CairoMakie is not built for 3D.

3D contour can't work in CairoMakie, It only works in GLMakie. Now no matter how my y coordinates are distributed, as long as the range of y remains unchanged, the contour result will remain unchanged. Maybe it's a bug for Makie