Only plot noise if noise_samples > 0
This commit is contained in:
parent
2b93a5f1bc
commit
4d8d419d31
|
@ -140,15 +140,16 @@ def plot_constellation(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Plot channel noise
|
# Plot channel noise
|
||||||
noisy_vectors = channel(constellation.repeat(noise_samples, 1))
|
if noise_samples > 0:
|
||||||
|
noisy_vectors = channel(constellation.repeat(noise_samples, 1))
|
||||||
|
|
||||||
ax.scatter(
|
ax.scatter(
|
||||||
*zip(*noisy_vectors.tolist()),
|
*zip(*noisy_vectors.tolist()),
|
||||||
marker='.',
|
marker='.',
|
||||||
s=5,
|
s=5,
|
||||||
c=list(range(order)) * noise_samples,
|
c=list(range(order)) * noise_samples,
|
||||||
cmap=color_map,
|
cmap=color_map,
|
||||||
norm=color_norm,
|
norm=color_norm,
|
||||||
alpha=0.7,
|
alpha=0.3,
|
||||||
zorder=8
|
zorder=8
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue