@@ -343,19 +343,19 @@ def scatter(shap_values, color="#1E88E5", hist=True, axis_color="#333333", cmap=
343343 tick_positions = np .array ([cname_map [n ] for n in cnames ])
344344 tick_positions *= 1 - 1 / len (cnames )
345345 tick_positions += 0.5 * (chigh - clow ) / (chigh - clow + 1 )
346- cb = pl .colorbar (p , ticks = tick_positions , ax = ax )
346+ cb = pl .colorbar (p , ticks = tick_positions , ax = ax , aspect = 80 )
347347 cb .set_ticklabels (cnames )
348348 else :
349- cb = pl .colorbar (p , ax = ax )
349+ cb = pl .colorbar (p , ax = ax , aspect = 80 )
350350
351351 cb .set_label (feature_names [interaction_index ], size = 13 )
352352 cb .ax .tick_params (labelsize = 11 )
353353 if categorical_interaction :
354354 cb .ax .tick_params (length = 0 )
355355 cb .set_alpha (1 )
356356 cb .outline .set_visible (False )
357- bbox = cb .ax .get_window_extent ().transformed (fig .dpi_scale_trans .inverted ())
358- cb .ax .set_aspect ((bbox .height - 0.7 ) * 20 )
357+ # bbox = cb.ax.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
358+ # cb.ax.set_aspect((bbox.height - 0.7) * 20)
359359
360360 # handles any setting of xmax and xmin
361361 # note that we handle None,float, or "percentile(float)" formats
@@ -690,19 +690,19 @@ def dependence_legacy(ind, shap_values=None, features=None, feature_names=None,
690690 if len (tick_positions ) == 2 :
691691 tick_positions [0 ] -= 0.25
692692 tick_positions [1 ] += 0.25
693- cb = pl .colorbar (p , ticks = tick_positions , ax = ax )
693+ cb = pl .colorbar (p , ticks = tick_positions , ax = ax , aspect = 80 )
694694 cb .set_ticklabels (cnames )
695695 else :
696- cb = pl .colorbar (p , ax = ax )
696+ cb = pl .colorbar (p , ax = ax , aspect = 80 )
697697
698698 cb .set_label (feature_names [interaction_index ], size = 13 )
699699 cb .ax .tick_params (labelsize = 11 )
700700 if categorical_interaction :
701701 cb .ax .tick_params (length = 0 )
702702 cb .set_alpha (1 )
703703 cb .outline .set_visible (False )
704- bbox = cb .ax .get_window_extent ().transformed (fig .dpi_scale_trans .inverted ())
705- cb .ax .set_aspect ((bbox .height - 0.7 ) * 20 )
704+ # bbox = cb.ax.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
705+ # cb.ax.set_aspect((bbox.height - 0.7) * 20)
706706
707707 # handles any setting of xmax and xmin
708708 # note that we handle None,float, or "percentile(float)" formats
0 commit comments