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
|
||||
noisy_vectors = channel(constellation.repeat(noise_samples, 1))
|
||||
if noise_samples > 0:
|
||||
noisy_vectors = channel(constellation.repeat(noise_samples, 1))
|
||||
|
||||
ax.scatter(
|
||||
*zip(*noisy_vectors.tolist()),
|
||||
marker='.',
|
||||
s=5,
|
||||
c=list(range(order)) * noise_samples,
|
||||
cmap=color_map,
|
||||
norm=color_norm,
|
||||
alpha=0.7,
|
||||
zorder=8
|
||||
)
|
||||
ax.scatter(
|
||||
*zip(*noisy_vectors.tolist()),
|
||||
marker='.',
|
||||
s=5,
|
||||
c=list(range(order)) * noise_samples,
|
||||
cmap=color_map,
|
||||
norm=color_norm,
|
||||
alpha=0.3,
|
||||
zorder=8
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue