From df24d6cde5cdaf4e6776e9c400e02685bbe6d1ca Mon Sep 17 00:00:00 2001 From: Jeff Moe Date: Sun, 29 Jan 2023 10:31:30 -0700 Subject: [PATCH] Polar Plot python from Cees Bassa in matrix --- polar-plot.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 polar-plot.py diff --git a/polar-plot.py b/polar-plot.py new file mode 100644 index 0000000..9fd02b6 --- /dev/null +++ b/polar-plot.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# +# polar_plot.py +# +# Copyright (C) 2023, Cees Bassa +# GPLv3+ + +import numpy as np +import matplotlib.pyplot as plt + +if __name__ == "__main__": + fig = plt.figure(figsize=(8, 8)) + ax = fig.add_subplot(111, projection="polar") + + ax.set_theta_offset(np.pi / 2.0) + ax.set_rticks([90, 60, 30, 0]) + ax.set_rgrids([90, 60, 30, 0], ["", "30$^\circ$", "60$^\circ$", ""], angle=22.5) + ax.grid(True) + ax.bar(0, 90).remove() + ax.set_rmax(90.0) + ax.set_ylim(0.0, 90.0) + + plt.show() +