Implement the equivalent of abline (plot line using slope/intercept only) to add line to graph
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
Currently there seems to be no way to add a line to an existing graph (e.g. as a new trace) based on slope and intercept and without the necessity to find out the actual ranges of x and y axes of the figure.
All examples I have seen so far are based on using existing x values of dots in a scatter plot, calculating the corresponding y values for the line and adding those line segments in a new scatter plot trace.
But this has two huge disadvantages:
- the y values have to get calculated for those x values (which may be a lot) or x values need to get selected
- if a lot of segmets are calculated, the graph complexity increases a lot as well
But plotting a line based on just slope and intercept is probably the second most easy thing to do, so there should be a way to add a line that way.
The basic signature of the corresponding method or class could be similar to the corresponding R function:
ABline(a=intercept, b=slope, h=yforhorizontallines, v=xforverticallines)
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
Nenhum arquivo ou teste é mencionado na issue. Comece revisando a plotting API existente e os testes para adicionar linhas ou traces; em seguida, compare o comportamento deles com a assinatura no estilo R solicitada. Considera-se concluído quando uma linha puder ser adicionada apenas a partir da inclinação/intercepto, com opções para linhas horizontais e verticais, sem exigir valores x amostrados nem uma busca manual do intervalo dos eixos.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- data-visualization
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100