From 89f04b3ad04bafc0bc3ce05b641f2bf3ed0733b7 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 13 Feb 2022 19:53:17 +0100 Subject: [PATCH] plot_constellation: added guard lines --- impl/utils/plot_constellation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/impl/utils/plot_constellation.py b/impl/utils/plot_constellation.py index d79de51..13bc046 100755 --- a/impl/utils/plot_constellation.py +++ b/impl/utils/plot_constellation.py @@ -15,4 +15,13 @@ with open(sys.argv[1], 'rb') as infile: data = np.fromfile(infile, dtype=np.complex64) pp.plot(np.real(data), np.imag(data), 'x') + + a = np.linspace(-np.pi, np.pi, 200) + pp.plot(np.cos(a), np.sin(a), 'k--', linewidth=0.7) + pp.plot([1, 1, -1, -1, 1], [1, -1, -1, 1, 1], 'k--', linewidth=0.7) + pp.plot([-1.5, 1.5], [0, 0], 'k--', linewidth=0.7) + pp.plot([0, 0], [-1.5, 1.5], 'k--', linewidth=0.7) + pp.xlim([-1.5, 1.5]) + pp.ylim([-1.5, 1.5]) + pp.axis('equal') pp.show()