I have asked this question before. How do I set the linewidth of the axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More recently, I used gca().frame.set_linewidth(2), but this doesn't seem to work anymore. I've tried gca().patch, to no avail. Any suggestions?