Serial plotter not working

Hi

I am testing this code, serial monitor is working but serial plotter not, any idea where is the problem ?

[code]/**
   Measures the voltage on an analog pin over a ~1s period of time
   and sends the Min, Max and Diff (Spread) values over Serial.

   Author: Dimitar Kovachev, http://lowvoltage.wordpress.com/

   Released under the Creative Commons Attribution Share-Alike 3.0 license
   http://creativecommons.org/licenses/by-sa/3.0/
*/
const int analogPin = A0;

void setup() {
  Serial.begin(115200);
  // Serial.begin(9600);
}

void loop() {
  int mn = 1024;     // mn only decreases
  int mx = 0;        // mx only increases

  // Perform 10000 reads. Update mn and mx for each one.
  for (int i = 0; i < 10000; ++i) {
    int val = analogRead(analogPin);
    mn = min(mn, val);
    mx = max(mx, val);
  }
 
  // Send min, max and delta over Serial
  Serial.print("\t m=");
  Serial.print(mn);
  Serial.print("\t M=");
  Serial.print(mx);
  Serial.print("\t D=");
  Serial.print(mx - mn);
  Serial.println();

}

[/code]

The serial plotter expects a certain format of the serial data. If you want to plot a single variable, you just call

Serial.println(variable);

In order to plot multiple variables, separate them by a whitespace. The serial plotter will do a plot for every new line received, so for your case this should be:

  Serial.print(mn);
  Serial.print(' ');
  Serial.print(mx);
  Serial.print(' ');
  Serial.println(mx - mn);

Commas (,) work too.

Thanks
It is working
Original was similar to yours but was not working.

Vik321:
Thanks
It is working
Original was similar to yours but was not working.
The Min-Max sketch | Low voltage. Mostly harmless...

Well how would you plot "m=number M=number D=number", if you expect "number number number" or "number,number,number"?
You can't exactly convert "m=number" to a number, can you?