Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Problems with SVG rendering in IPython.display in Jupyter ipynb

Aberta
#969 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
jupyter-notebook, python
Domínio
frontend

Direção de pesquisa

Comece executando SVG_Woe_Demo.ipynb e comparando os três arquivos SVG anexados, com foco na ordem em que os objetos IPython.display.SVG são passados para display. Reproduza o texto embaralhado nas saídas subsequentes das células de código e rastreie o caminho de renderização da saída do notebook. O trabalho estará concluído quando os SVGs forem renderizados de forma consistente e o texto deles não estiver mais embaralhado, independentemente da ordem de display.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Python
Estrelas
734
Forks
411
Merge médio
1d 6h
PRs com merge (30d)
10

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ipython/ipykernel

Todas as issues de ipython/ipykernel

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.