Closed
Description
I find the current handling of background colors very non-intuitive:
- figure
facecolor
is not applied forsavefig()
by default - figure
facecolor
is not applied settingframeon=False
axis_bgcolor
is not applied when hiding axis lines/ticks viaaxis('off')
So using a white plain surface to draw objects needs the following code:
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)
My suggestion
- apply same colors to
savefig()
by default - mention in the docs of
axis_bgcolor
andaxis('off')
that this setting is ignored - mention in the docs of
facecolor
andframeon
that this setting is ignored
Metadata
Metadata
Assignees
Labels
No labels