If there happen to be multiple rows that are at max you could do
Names default to here(1);
dt = New Table( "Test",
Add Rows( 46 ),
New Column( "x",
Set Values(
[1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4,
2.5, 2.6, 2.7, 2.8, 2.9, 3, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9,
4, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5, 5.1, 5.2, 5.3, 5.4,
5.5]
)
),
New Column( "y",
Set Values(
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2,
1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2,
1]
)
)
);
mxrow = dt << get rows where (:y == col max(:y) );
mxx = dt:x[mxrow];
dt << select where (Any(mxx - 0.3 <= :x < mxx + 0.3));
gb = dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :x ), Y( :y ) ),
);
The unselected point on the second peak is because of floating error.