Makie axis tick relabelling, marching cubes algorithm output

Mahnoor_Pop
Sun, 21 Jan 2024 21:42:07 +0000
Visualization

Hi all! I’m plotting a mesh made using MarchingCubes.jl and want to readjust the axis tick labels. Currently, the values just represent how many cubes there are along each dimension (e.g. 0:11 x 0:11 x 0:11), but I want them to be the actual values of the initial points (-1:2 x -1:2 x -1:2)/ I tried changing xticks like so:

 # need to fix axes
    ax = Axis3(f[1,1], title = "Marching Cubes Mesh of Basin of Attraction",
    )
    fig = mesh!(msh; color = :gray)

    ax.xticks = range(-1, 2, length = 11)

and this was my result:

Which has just put labels on those points, but not relabelled the whole x-axis.
I know that in the MarchingCubes.jl package there’s some sort of scaling option, but I don’t really understand how it works…

Many thanks!

3 posts - 2 participants