optic.plot.plotColoredConst
- plotColoredConst(symb, constSymb, px=None, SNR=20, rule='MAP', cmap=<matplotlib.colors.ListedColormap object>, fig=None, ax=None)
Colored constellation scatter plot.
- Parameters:
symb (np.array) – Complex-valued constellation symbols.
constSymb (np.array) – Complex-valued constellation symbols used for detection.
px (array_like, optional) – Prior probabilities of symbols.
SNR (float, optional) – Signal-to-Noise Ratio (SNR) in decibels (dB). Default is 20 dB.
rule (str, optional) – Detection rule, either “MAP” for Maximum A Posteriori or “ML” for Maximum Likelihood. Default is “MAP”.
cmap (matplotlib.colors.Colormap, optional) – Colormap for coloring the constellation symbols. Default is matplotlib.cm.turbo.
fig (matplotlib.figure.Figure, optional) – Figure object for the plot. If None, a new figure is created. Default is None.
ax (matplotlib.axes.Axes, optional) – Axes object for the plot. If None, a new axes is created. Default is None.
- Returns:
fig (matplotlib.figure.Figure) – Figure object for the plot.
ax (matplotlib.axes.Axes) – Axes object for the plot.
Notes
This function generates a scatter plot of complex-valued constellation symbols with colors representing the corresponding decided constellation symbols based on detection results.
The detected symbols are determined using a detector based on the provided input symbols, noise variance, detection rule, and prior probabilities (if available).