#!/usr/bin/env python3 # # polar-plot # # Copyright (C) 2023, Jeff Moe # Copyright (C) 2023, Cees Bassa # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # polar_plot # Generate graphical plot of radio interference. # # Usage: # polar_plot # # Example: # polar_plot 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()