plot_constellation: added guard lines

This commit is contained in:
Thomas Kolb 2022-02-13 19:53:17 +01:00
parent eb3fc5f9c7
commit 89f04b3ad0

View file

@ -15,4 +15,13 @@ with open(sys.argv[1], 'rb') as infile:
data = np.fromfile(infile, dtype=np.complex64) data = np.fromfile(infile, dtype=np.complex64)
pp.plot(np.real(data), np.imag(data), 'x') 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() pp.show()