|
@@ -170,6 +170,28 @@ Test point near high way intersection (North Carolina sample dataset)
|
|
|
Horizon angles for test point (CCW from East)
|
|
|
</center>
|
|
|
|
|
|
+<p>We can plot horizon in polar coordinates using Matplotlib in Python:
|
|
|
+<div class="code"><pre>
|
|
|
+import numpy as np
|
|
|
+import matplotlib.pyplot as plt
|
|
|
+
|
|
|
+horizon = np.genfromtxt('horizon.csv', delimiter=',')
|
|
|
+horizon = horizon[1:, :]
|
|
|
+
|
|
|
+ax = plt.subplot(111, polar=True)
|
|
|
+bars = ax.plot(horizon[:, 0] / 180 * np.pi,
|
|
|
+ (90 - horizon[:, 1]) / 180 * np.pi)
|
|
|
+# uncomment the 2 following lines when using -c flag
|
|
|
+# ax.set_theta_direction(-1)
|
|
|
+# ax.set_theta_zero_location('N')
|
|
|
+plt.show()
|
|
|
+</pre></div>
|
|
|
+
|
|
|
+<center>
|
|
|
+<img src="rhorizon_polar_plot.png"><br>
|
|
|
+Horizon plot in polar coordinates.
|
|
|
+</center>
|
|
|
+
|
|
|
<h3>Raster map mode</h3>
|
|
|
|
|
|
Raster map mode (output maps "horangle*" become input for <em>r.sun</em>):
|