Hello,
I think I understand fundamentally what you're doing, and the reason for the unstable picture could be a couple of reasons. You mention you are basically getting data in 1024 byte pieces (of course your serial port is getting them byte by byte, but the 1024 byte pieces constitute your "linear image" if I understand you correctly). Either of the following could cause an unstable picture:
1. You are updating the graph with a few pixels at a time, causing the picture to be constantly changing and updating - to solve this you should read 1024 data points and only update your plot with the whole 1024 points at a time... this will also cause fewer screen updates, and possibly thread swaps, making your code generally more efficient.
2. You are reading your data in 1024 byte chunks, and you actually ARE receiving a termination character - in this case that termination character is probably being read as part of your data and it causing things to look a bit off... to solve this, you should configure your serial port to use termination, and specify the termination character which your device sends with the data... then the result of your read operation will read up to and including that termination character, and you can simply remove that last byte from the string you read before converting to a byte array and plotting (or you could remove it from the array after converting).
3. If you are trying to read your data and update it in real-time... where you expect to see the 1024 pixel "frames" played one after the other, then how the data is transmitted will also affect the display, since you can only display it once you have it all. Basically, if you can configure your device to transmit at a higher baud rate (and you would then have to do the same for your COM port, but you can do this using the VISA configure serial VI... I presume you are using VISA to communicate with your serial port), then you can receive your data faster and perhaps that will "smooth" out your plot.
Ok, those are a few ideas... I hope this helps!
Best Regards,
JLS