Only plot noise if noise_samples > 0

This commit is contained in:
Mattéo Delabre 2019-12-16 01:49:35 -05:00
parent 2b93a5f1bc
commit 4d8d419d31
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 12 additions and 11 deletions

View File

@ -140,6 +140,7 @@ def plot_constellation(
) )
# Plot channel noise # Plot channel noise
if noise_samples > 0:
noisy_vectors = channel(constellation.repeat(noise_samples, 1)) noisy_vectors = channel(constellation.repeat(noise_samples, 1))
ax.scatter( ax.scatter(
@ -149,6 +150,6 @@ def plot_constellation(
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
) )