Created
October 17, 2017 16:40
-
-
Save aizquier/bfbd93c0bb49a30bcb21412a75f33bb0 to your computer and use it in GitHub Desktop.
Azimuth plot for archaeoastronomy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
# azimuths to plot (degrees) | |
data = [95, 87, 82, 96, 78, 89, 129, 264, 277, 58] | |
# convert to radians | |
azimuths_rad = (np.array(data) * np.pi) / 180.0 | |
# Polar plotting | |
fig = plt.figure() # Size | |
plt.grid(color='#888888', linewidth=0.5) # Color the grid | |
ax = plt.subplot(111, polar=True) # Create subplot | |
ax.set_theta_direction(-1) # plot clockwise | |
ax.set_theta_zero_location('N') # Set zero to North | |
ax.axes.get_yaxis().set_visible(False) | |
for az in azimuths_rad: | |
ax.plot([az, az], [0.9, 1.0], color="#000000",linewidth=1) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment