fig.add_vline fails on figure with a separate subplot containing Scatter3d
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 18.8k
- Forks
- 2.8k
- Merge médio
- 16h 26min
- PRs com merge (30d)
- 21
Descrição
The following code creates a 2D subplot in the left column and a 3D subplot in the right column. Adding a vertical line to the 2D subplot fails if a Scatter3d has been added to the 3D subplot.
Another bug shown in this example is that add_vline does not add any annotations if the plot is empty.
from plotly import subplots
specs = [
[{}, {'type': 'scene', 'rowspan': 1}],
]
fig = subplots.make_subplots(rows=1, cols=2, specs=specs)
# Add dummy data
# If both of these are commented out, fig.add_vline does nothing
# If neither are commented out, fig.add_vline raises a PlotlyKeyError
# If fig.add_scatter3d is commented out, the figure is generated successfully
fig.add_scatter(x=[0, 1], y=[0, 1], row=1, col=1)
fig.add_scatter3d(x=[0, 1], y=[0, 1], z=[0, 1], row=1, col=2)
# Add vertical line to left (2D) subplots only
fig.add_vline(x=2, col=1) # Raises PlotlyKeyError
(Plotly version 5.9.0)
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza primeiro o exemplo fornecido de make_subplots, add_scatter3d e add_vline, incluindo as três configurações de dados mostradas. Rastreie o ponto de entrada de add_vline e seu tratamento de subplots 2D e de cena; considera-se concluído quando a linha vertical 2D não gerar mais PlotlyKeyError e os gráficos vazios receberem anotações.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- plotly, python
- Domínio
- data-visualization
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 42/100