I draw the azimuthal height curve in the polar region, where the height is the radial component. By default, Matplotlib displays a radial value from 0 in the center to 90 around the perimeter. I want to reverse, so 90 degrees are in the center. I tried to set limits with ax.set_ylim (90,0), but this raises a LinAlgError exception. ax is the axis object obtained from the add_axes call.
Can this be done, and if so, what should I do?
Edit: this is what I'm using right now. The main build code was taken from one of the Matplotlib examples.
rc('grid', color='#316931', linewidth=1, linestyle='-')
rc('xtick', labelsize=10)
rc('ytick', labelsize=10)
width, height = matplotlib.rcParams['figure.figsize']
size = min(width, height)
fig = figure(figsize=(size, size))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], projection='polar', axisbg='#d5de9c')
ax.set_theta_zero_location("N")
obs.date = datetime.datetime.utcnow()
az,el = azel_calc(obs, ephem.Sun())
ax.plot(az, el, color='#ee8d18', lw=3)
obs.date = datetime.datetime.utcnow()
az,el = azel_calc(obs, ephem.Moon())
ax.plot(az, el, color='#bf7033', lw=3)
ax.set_rmax(90.)
grid(True)
ax.set_title("Solar Az-El Plot", fontsize=10)
show()
The plot derived from this,
