Bug docstring for set_matplotlib_formats
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- jupyter-notebook, python
调研方向
从 matplotlib_inline.backend_inline.set_matplotlib_formats 开始,使用 matplotlib 3.10.5 重现文档中的示例。将 docstring 的 quality 参数与所示的 pil_kwargs workaround 进行比较;当文档准确描述受支持的参数,并且该示例不再导致用户遇到报告的 TypeError 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
For matplotlib_inline.__version__ == '0.1.7' (matplotlib.__version__ == '3.10.5')
from matplotlib_inline.backend_inline import set_matplotlib_formats
help(set_matplotlib_formats)
print:
...
For example, this enables PNG and JPEG output with a JPEG quality of 90%::
In [1]: set_matplotlib_formats('png', 'jpeg', quality=90)
But:
import matplotlib.pyplot as plt
from matplotlib_inline.backend_inline import set_matplotlib_formats
set_matplotlib_formats('png', 'jpeg', quality=90)
fig, ax = plt.subplots()
plt.show()
Cause:
...
TypeError: FigureCanvasAgg.print_png() got an unexpected keyword argument 'quality'
...
TypeError: FigureCanvasAgg.print_jpg() got an unexpected keyword argument 'quality'
Workaround, probably use:
set_matplotlib_formats('png', 'jpeg', pil_kwargs=dict(quality=10))
or
%config InlineBackend.print_figure_kwargs = {'pil_kwargs': {'quality' : 90, \
'optimize': True}}
- 主要语言
- Jupyter Notebook
- 星标
- 31
- 派生
- 39
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipython/matplotlib-inline 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
ipython/matplotlib-inline#61 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#59 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#57 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#54 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
ipython/matplotlib-inline#43 ·
查看 ipython/matplotlib-inline 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
chore P3 plotly-internal size: 3 task
难度 2/5 1-3 小时 新手友好度 77/100
-
难度 2/5 1-3 小时 新手友好度 65/100
jbkunst/highcharter#849 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
equinor/energyvision#4027 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
bancolombia/sentinel#23 ·