# Origin shift with Analyze Line Graph

I’m using FIJI to extract the profile of a line obtained on a photo of the interface water/sediment taken into a glass aquarium. After ticking Invert Y Coordinates, setting the origin, scaling the image, setting it to 8-bit, I isolated and selected the line adjusting the threshold.

The aim is to convert the profile to an exploitable graph with its coordinates using Analyze > Tools > Analyze Line Graph. The problem I get is the following:

[The black line is drawn on what should be the x axis according to the set origin (the x coordinates of the set origin is x = 0 pixel).]

Not only the line graph is inverted on the x axis but the threshold of sign change (that is valid on the image i.e. all y values below the black line are negative) concerns only x values, that should be always positive…

Could someone explain to me this behavior from Analyze Line Graph that I don’t understand? I get the same kind of problem if the Y coordinates are not inverted.

Hi @kraussi
I’m trying to interpret your problem.
I have not made any change of axis or origin.
Without an original image I used this:

Here is the macro used

``````selectWindow("Untitled-1.jpg");
rename("profil");
selectWindow("profil");
run("8-bit");
setAutoThreshold("RenyiEntropy");
//run("Threshold...");
//setThreshold(0, 252);
run("Analyze Line Graph");
selectWindow("profil");
selectWindow("Line Graph");
Plot.getValues(x, y);
for (i=0; i<x.length; i++)
print(x[i], y[i]);
``````

I get the values of y = f (x).
If it helps …

If there is a reference level y then you could change a row.
Example if the level y = 0 is at 100
Change with this
print(x[i], y[i]-100);