Releases of matplotlib after 2.0.2 cause the polar plot to be drawn incorrectly. The top of the green plot goes missing. None of the input data has been changed between versions.
Version 2.1.0
Version 2.0.2 (good)
import matplotlib.pyplot as plt
theta_radians = np.radians(theta)
fig = plt.figure()
ax = fig.add_subplot(111, polar=True)
ax.set_theta_zero_location("S")
ax.plot(theta_radians, r, color='green')
ax.plot(np.dot(theta_radians, -1), r, color='green')
ax.plot(horiz, arr[25, :])
fig.savefig('./filename.png', dpi=300)
fig.show()
The issue seems to be in the way it sets the bottom limit. I managed to resolve this using:
ax.set_rlim(0,max)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.