fig = figure(..., facecolor='w', edgecolor='None')
ax.axis('equal') # equal scale
ax.axis('off') # do not show axis
ax.axis([-1, 1, -1, 1]) # scale to unit lengths
show()
fig.savefig(..., facecolor=fig.get_facecolor(), edgecolor='None', transparent=True)
I find the current handling of background colors very non-intuitive:
facecoloris not applied forsavefig()by defaultfacecoloris not applied settingframeon=Falseaxis_bgcoloris not applied when hiding axis lines/ticks viaaxis('off')So using a white plain surface to draw objects needs the following code:
My suggestion
savefig()by defaultaxis_bgcolorandaxis('off')that this setting is ignoredfacecolorandframeonthat this setting is ignored