-
sdr.plot.raster(x: NDArray, length: int | None =
None
, stride: int | None =None
, sample_rate: float | None =None
, color: 'index' | str ='index'
, colorbar: bool =True
, **kwargs) Plots a raster of the time-domain signal \(x[n]\).
- Parameters:¶
- x: NDArray¶
The time-domain signal \(x[n]\). If
x
is complex, the real and imaginary rasters are interleaved. Time order is preserved. Ifx
is 1D, the rastering is determined bylength
andstride
. Ifx
is 2D, the rows correspond to each raster.- length: int | None =
None
¶ The length of each raster in samples. This must be provided if
x
is 1D.- stride: int | None =
None
¶ The stride between each raster in samples. If
None
, the stride is set tolength
.- sample_rate: float | None =
None
¶ The sample rate \(f_s\) of the signal in samples/s. If
None
, the x-axis will be labeled as “Samples”.- color: 'index' | str =
'index'
¶ Indicates how to color the rasters. If
"index"
, the rasters are colored based on their index. If a valid Matplotlib color, the rasters are all colored with that color.- colorbar: bool =
True
¶ Indicates whether to add a colorbar to the plot. This is only added if
color="index"
.- **kwargs¶
Additional keyword arguments to pass to
matplotlib.collections.LineCollection
. The following keyword arguments are set by default. The defaults may be overwritten."linewidths"
: 1"linestyles"
:"solid"
"cmap"
:"rainbow"