Problems with SVG rendering in IPython.display in Jupyter ipynb

オープン
#969 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
jupyter-notebook, python
領域
frontend

調査の方向性

まず SVG_Woe_Demo.ipynb を実行し、添付された 3 つの SVG ファイルを比較します。その際、IPython.display.SVG オブジェクトが display に渡される順序に注目してください。後続のコードセルの出力でテキストが混乱する状態を再現し、ノートブック出力のレンダリング経路を追跡します。display の順序に関係なく SVG が一貫してレンダリングされ、テキストが混乱しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm trying to use IPython to display SVGs in the output of code cells, but I've observed some very strange behaviour in the way it renders: text in the images displays correctly in the first SVG I display, but in all the subsequent SVGs displayed, it is scrambled.

Displayed in markdown cells using html, all the SVGs display perfectly, but rendered in the code output by IPython they are scrambled. If I create a new IPython.display.SVG object from the file that was the first to display, it also displays correctly. It seems that the factor that determines which image will be displayed correctly is the order in which the IPython.display.SVG object is passed to display, not the order in which the filenames for the svg-files are passed to SVG. I've included the three svg-files, and an ipynb that demonstrates all of this.

This is very confusing - can you help?

figtree_0
figtree_1
figtree_2
SVG_Woe_Demo.ipynb.zip

主要言語
Python
スター
734
フォーク
411
平均マージ
1日 2時間
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipython/ipykernel のほかの issue

ipython/ipykernel の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。