Which board are you using?
Itβs an Arduino UNO clone!
OK, I had a hypothesis that the problem might be solved by adding while(!Serial) {} to your code to cause the board to wait until the serial port has been opened before proceeding. However, that is only useful on boards that use native USB (e.g., Leonardo). The UNO R3 has a dedicated USB interface chip, so that code doesn't have any effect on the UNO R3. Likewise, such code is generally not needed on boards like the UNO R3.
Another possible fix would be increasing the duration of this delay:
On some boards, such a delay is necessary to give the serial port a bit more time to fully initialize before sending data. I suspect the minimum duration of the delay may be variable, depending on the specifics of the environment in which the port is being used. In past experiments, I found that 200 ms was about the absolute minimum effective duration (e.g., data is lost if I reduce it further to 100 ms) on my specific system, and this caused me to suspect that the minimum effective duration might be even longer on other systems. So I have generally chosen a more conservative 500 ms. I don't use Serial Plotter much, so my experience is based on Serial Monitor.
Although I have found it necessary when using some other boards, I have actually never found that any delay is needed when using the UNO R3 (including cheap derivatives with the CH340 USB chip), so I'm not certain this is relevant. However, I think it is at least worth a try to increase the delay to something very conservative like 2000 ms to see if that will make the sketch work as expected on the macOS machine. If you find it makes a difference, you can then refine the duration down to something that causes the sketch to work reliably without imposing an excessive delay.
Thank you very much for your efforts, i will give it a go and see what happens.
Increasing the delay made no difference unfortunately. However I have discovered that I get a perfect Sine Wave starting at 0,0 when I first start up the IDE, plug in the UNO then press the button. The only way to avoid losing the first point is to close down the IDE, unplug the UNO and start again. There are obviously anomalies, but at least I have a process to get the Sine Wave I want. Thanks again!