zl程序教程

您现在的位置是:首页 >  其他

当前栏目

jupyter notebook 调整字体 以及matplotlib显示中文

中文matplotlib 显示 以及 调整 字体 Jupyter Notebook
2023-06-13 09:17:14 时间

原生的jupyter theme看起来比较蛋疼,尤其是字体和字号。为了修改这个配置可以安装 jupyter theme。

项目链接: https://github.com/dunovank/jupyter-themes 如果不喜欢英文可以参考这个链接:https://www.jianshu.com/p/6de5f6cce06d

上面的样式对应的配置命令:
jt  -f fira -fs 11 -cellw 90% -ofs 11 -dfs 11 -T -t solarizedl

除此之外matplotlib 默认不支持中文显示,主要是字体问题,可以通过下面的代码配置来让matplotlib 支持中文

from matplotlib import pyplot as plt
%matplotlib inline
font = {'family' : 'MicroSoft YaHei',
'weight' : 'bold',
'size' : 10}
plt.rc("font", **font)

实际效果,另外还可以使用altair ,altair 默认支持中文显示 https://altair-viz.github.io

☆文章版权声明☆

* 网站名称:obaby@mars * 网址:https://h4ck.org.cn/ * 本文标题: 《jupyter notebook 调整字体 以及matplotlib显示中文》 * 本文链接:https://h4ck.org.cn/2019/11/jupyter-notebook-%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93-%e4%bb%a5%e5%8f%8amatplotlib%e6%98%be%e7%a4%ba%e4%b8%ad%e6%96%87/ * 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


分享文章:

相关文章:

  1. IDA Pro Plugin wizard for vs2013
  2. 上一篇文章的代码(开源Github)
  3. Porn Data Anaylize — AI换脸 分类数据浅析(github)
  4. hubot install. hubot 机器人安裝
  5. Porn Data Anaylize — 标签 模特信息分析(github)
  6. Windows 7 Eric4 PySide环境配置
  7. IDA_SYNC_PLUGIN (v2.0.0.1) for IDA 6.x
  8. Porn Data Anaylize — 上传者 分类信息分析(github)
  9. 批处理 激活virtualenv 并且运行Python 命令
  10. Win10 Tensorflow-gpu 不完全安装手册