@@ -104,6 +104,8 @@ def plot_figure(axs, style_label=""):
104
104
# Use a dedicated RandomState instance to draw the same "random" values
105
105
# across the different figures.
106
106
prng = np .random .RandomState (96917002 )
107
+ # the facecolor rcparam is not applied to subfigures, so
108
+ # do so manually here:
107
109
axs [0 ].figure .set_facecolor (plt .rcParams ['figure.facecolor' ])
108
110
axs [0 ].set_ylabel ('ylabel' )
109
111
@@ -113,13 +115,17 @@ def plot_figure(axs, style_label=""):
113
115
plot_colored_circles (axs [3 ], prng )
114
116
plot_colored_sinusoidal_lines (axs [4 ])
115
117
plot_histograms (axs [5 ], prng )
118
+ # make a suptitle, in the same style for all subfigures,
119
+ # except those with dark backgrounds, which get a lighter
120
+ # color:
116
121
col = np .array ([19 , 6 , 84 ])/ 256
117
122
back = mcolors .rgb_to_hsv (
118
123
mcolors .to_rgb (plt .rcParams ['figure.facecolor' ]))[2 ]
119
124
if back < 0.5 :
120
125
col = [0.8 , 0.8 , 1 ]
121
- axs [0 ].figure .suptitle (style_label , x = 0.03 , fontsize = 12 ,
122
- ha = 'left' , color = col )
126
+ axs [0 ].figure .suptitle (style_label , x = 0.015 , fontsize = 14 , ha = 'left' ,
127
+ color = col , fontfamily = 'DejaVu Sans' ,
128
+ fontweight = 'normal' )
123
129
124
130
if __name__ == "__main__" :
125
131
0 commit comments