You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue rendering polar plot (agg backend?) with rorigin set #17418
When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and saving it with the UI as a png works as expected.
importmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlib.gridspecimportGridSpecnbins=50data=np.random.randint(0, 42, nbins)
fig=plt.figure()
ax_g=fig.add_subplot(polar=True, facecolor="none")
theta=np.array(
[np.pi/2-i*2*np.pi/len(data) foriinrange(len(data))])
lines=ax_g.plot(theta, data)
ax_g.set_rorigin(-78) # Replacing this with ax_g.set_rmin works as expected, so the problem comes from this line.fig.savefig("bug.png")
fig.savefig("bug.pdf")
Activity