From 06365754d9ca75eadc66de534c72e7c983a175b5 Mon Sep 17 00:00:00 2001 From: JingkunZhao <155940781+SylviaZhaooo@users.noreply.github.com> Date: Tue, 8 Oct 2024 19:35:28 +1100 Subject: [PATCH] [unpleasant] Fix translation error (#85) * [unpleasant] Translation * Fix code issue * Fix code issues * Fix translation error --------- Co-authored-by: Matt McKay --- lectures/unpleasant.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lectures/unpleasant.md b/lectures/unpleasant.md index d5a557e..a78c8a6 100644 --- a/lectures/unpleasant.md +++ b/lectures/unpleasant.md @@ -300,6 +300,10 @@ $$ import numpy as np import matplotlib.pyplot as plt from collections import namedtuple +import matplotlib as mpl +FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf" +mpl.font_manager.fontManager.addfont(FONTPATH) +plt.rcParams['font.family'] = ['Source Han Serif SC'] ``` 现在让我们开始实现我们的伪代码用 Python。