Class representing a trace for plotting.
Attributes:
name: The name of the trace.
x: The x data points.
y: The y data points.
square: Whether the trace should be a square wave.
extend: Whether the trace should extend the last value.