Welcome to the forum @Martin_Feng!
Sincere thank you for the bug report. The x-Axis uses the spatial calibration units of the image by default (it can also use node indices, see below). But as you noticed, there was a bug: the values were being retrieved as the Euclidean distances between each node and the root of the path, rather than the cumulative distances from the path’s root. I fixed this issue a couple of days ago (the fix should be available in the NeuroAnatomy update site soon). While at it, I also noticed that profiles were not being retrieved for single-channel 2D images so I fixed that too.
To use path indices you could you a script, as follows (python):
# @SNTService snt
# @UIService ui
from sc.fiji.snt import Tree
from sc.fiji.snt.analysis import PathProfiler
if not snt.getUI():
ui.showDialog("SNT is not running.", "Error")
# Retrieve image
if not snt.getPlugin().accessToValidImageData():
ui.showDialog("No image data has been loaded", "Error")
imp = snt.getPlugin().getLoadedDataAsImp()
# Retrieve selected paths in the Path Manager dialog.
# If no selection exists retrieve all listed paths
paths = snt.getSelectedPaths()
if not paths:
paths = snt.getPaths()
# Assemble the profiler using node indices rather than distance. Note that in headless
# scripts we could assemble the PathProfiler directly from a Tree and an image
profiler = PathProfiler(Tree(paths), imp)
# To access the profile data one could use profile.getValues()
# For now let's just display the plot