@@ -6060,28 +6060,25 @@ def color_boxes(fig, axs):
6060
6060
bbspines = []
6061
6061
for nn , a in enumerate (['bottom' , 'top' , 'left' , 'right' ]):
6062
6062
bb = axs .spines [a ].get_window_extent (renderer )
6063
- if bb :
6064
- spiner = plt .Rectangle ((bb .x0 , bb .y0 ), width = bb .width ,
6065
- height = bb .height , linewidth = 0.7 ,
6066
- edgecolor = "green" , facecolor = "none" ,
6067
- transform = None , zorder = 3 )
6068
- fig .add_artist (spiner )
6063
+ spiner = plt .Rectangle ((bb .x0 , bb .y0 ), width = bb .width ,
6064
+ height = bb .height , linewidth = 0.7 ,
6065
+ edgecolor = "green" , facecolor = "none" ,
6066
+ transform = None , zorder = 3 )
6067
+ fig .add_artist (spiner )
6069
6068
bbspines += [bb ]
6070
6069
6071
6070
bb = axs .get_window_extent ()
6072
- if bb :
6073
- rect2 = plt .Rectangle ((bb .x0 , bb .y0 ), width = bb .width , height = bb .height ,
6074
- linewidth = 1.5 , edgecolor = "magenta" ,
6075
- facecolor = "none" , transform = None , zorder = 2 )
6076
- fig .add_artist (rect2 )
6071
+ rect2 = plt .Rectangle ((bb .x0 , bb .y0 ), width = bb .width , height = bb .height ,
6072
+ linewidth = 1.5 , edgecolor = "magenta" ,
6073
+ facecolor = "none" , transform = None , zorder = 2 )
6074
+ fig .add_artist (rect2 )
6077
6075
bbax = bb
6078
6076
6079
6077
bb2 = axs .get_tightbbox (renderer )
6080
- if bb2 :
6081
- rect2 = plt .Rectangle ((bb2 .x0 , bb2 .y0 ), width = bb2 .width ,
6082
- height = bb2 .height , linewidth = 3 , edgecolor = "red" ,
6083
- facecolor = "none" , transform = None , zorder = 1 )
6084
- fig .add_artist (rect2 )
6078
+ rect2 = plt .Rectangle ((bb2 .x0 , bb2 .y0 ), width = bb2 .width ,
6079
+ height = bb2 .height , linewidth = 3 , edgecolor = "red" ,
6080
+ facecolor = "none" , transform = None , zorder = 1 )
6081
+ fig .add_artist (rect2 )
6085
6082
bbtb = bb2
6086
6083
return bbaxis , bbspines , bbax , bbtb
6087
6084
0 commit comments