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
-
scope: charts status: waiting for maintainer
難度 2/5 1-3 小時 新手友好度 88/100
-
chore P3 plotly-internal size: 3 task
難度 2/5 1-3 小時 新手友好度 77/100
-
難度 2/5 1-3 小時 新手友好度 76/100
Live-Charts/LiveCharts2#2394 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
jbkunst/highcharter#849 ·