jackfrued / jackfrued/Python-100-Days
Day16-20/code/example01.py
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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