Stockard
Stockard

Reputation: 21

Glyph errors in tick labels when using shap values to analysis my model

I am using shap package in python to recreate some graphs for my model. One of them is the waterfall chart, which is from the manual I followed generated using the following code(the complete code is too long so please check the manual).

shap.waterfall_plot(shap_explainer_values[4652])

however, the minus sign of my graph is missing with the warning message "Glyph 8722 (\N{MINUS SIGN}) missing from current font."

enter image description here There are a bunch of questions on stackoverflow related to this problem, all could be solved with

plt.rcParams['axes.unicode_minus'] = False

However, mine couldn't. Could anyone help with this particular question?

I tried shutil.rmtree(matplotlib.get_cachedir()) as well.

Upvotes: 0

Views: 115

Answers (1)

RenQ Armstrong
RenQ Armstrong

Reputation: 21

try to use the font 'Microsoft YaHei', which works for me.

Upvotes: 1

Related Questions