I have three data files each with a matrix; I use stats to find the maximum value in the matrix for each file and it is displayed correctly. I need to use those three maximum values as data points and plot them so as to have points on my plot as (1.0, A_max), (2.0, B_max) and (3.0, C_max) where A_max is the maximum value calculated using stats from first data file, B_max from second and C_max from third. Here is how my gp file looks like :
set terminal epslatex size 3.5,2.62 color colortext
set output 'data.tex'
set xlabel '$x$'
set ylabel '$y$'
stats 'dataA.txt' matrix name "A"
show variables A_
stats 'dataB.txt' matrix name "B"
show variables B_
stats 'dataC.txt' matrix name "C"
show variables C_
plot '-' w p, '-' w p, '-' w p
1.0 A_max
e
2.0 B_max
e
3.0 C_max
e
The plot I get, looks like below.

Clearly, it is taking x-axis as 0 and the points I intend for my x-axis corresponding to y. Not sure what I am missing, probably how to read the stats variable. Any help will be appreciated.