'Python plot where each X-axis value has its Y-axis value

I would like show plot in Python, where on X axis is position (0,1,2,3 etc.) and each X position has Y axis value of voltage from MCU via pyserial and these Y values (voltages) are changing in real time.

I searched of this type of plot, but I can´t find any examples. Do you have someone a idea, how write Python code for this?

Thanks a lot for answer



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source