Makie axis tick relabelling, marching cubes algorithm output

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!

You’re currently choosing different tick positions but you want different tick labels. So you need to pass a tuple (positions, labels) to xticks

1 Like

thanks a lot! works great :slight_smile: