I have a polar axes in matplotlib that has text which extends outside of the range of the axes. I would like to remove the border for the axis -- or set it to the color of the background so that the text is more legible. How can I do this?
Simply increasing the size of the axes is not an acceptable solution (because the figure is embeddable in a GUI and it becomes too small if this is done). Changing the color of the background to be black so that the border is not visible is also not an acceptable solution.
A considerable amount of code that does various parts of plotting things is omitted, but here is the generation of the figure and axes itself:
import pylab as pl
fig = pl.figure(figsize=(5,5), facecolor='white')
axes = pl.subplot(111, polar=True, axisbg='white')
pl.xticks([])
pl.yticks([])
pl.ylim(0,10)
# ... draw lots of things
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…