jackfrued / jackfrued/Python-100-Days

Day16-20/code/example01.py

Open
#179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

生成图表中的中文标签显示不正常,加入如下代码修正:
前面加入:
import matplotlib

main()中加入:
matplotlib.rcParams['font.family']='STSong' #设置中文字体
matplotlib.rcParams['font.size']=16 # 字体大小

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open Day16-20/code/example01.py and inspect how the chart is created in main(). Add the requested matplotlib import and font settings there, then run the example and verify that Chinese chart labels render correctly with the intended font size.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.