Question

When I set the visibility of the axis to false, the axis are replaced by a bounding box. Please would someone be able to help me to remove the bounding frame.

import pylab

x=[0.1,0.2,0.3,0.4]
y=[0.2,0.4,0.6,0.8]


pylab.figure(num=1,frameon=False)
circle = pylab.Circle((0, 0), 1.025, color="black", fill=None)
ax = pylab.subplot(111, aspect=1)
ax.add_artist(circle)
ax.scatter(x,y,s=30, c='red', marker='o', edgecolor='red')
pylab.xlim([-1.1,1.1])
pylab.ylim([-1.1,1.1])
ax.xaxis.set_visible(False)
ax.yaxis.set_visible(False)
pylab.title("Plot")
pylab.show()
Was it helpful?

Solution

Try ax.axison=False, as you noticed axes are "replaced" by the bounding box, but it looks like it has nothing to do with the figure. In IPython I just browsed through the properties of ax and found the property axison. Turned it to false and it worked for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top