Detecting cordinates of maxima in serial plotter

I am currently working on a project that requires me to detect the x coordinate of the maxima of the graph in the serial plotter. The graph will keep shifting and so will the maxima and x coordinate. I need to monitor these x coordinate changes. How can i do this? Thanks

But that will be in the serial plotter right? Because when using the plotter there is just not much you can do...

What serial plotter?

Given no further information I would guess that you have to interpret all of the commands going to the serial plotter and remember the maximum X coordinate used. To do that you need to know the protocol.

How can i do this?

YOU are sending the data to be plotted. You KNOW (or darn well should) if a value being sent is higher than any other value sent.