Implement the equivalent of abline (plot line using slope/intercept only) to add line to graph
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 18.8k
- Forks
- 2.8k
- Merge medio
- 16 h 26 min
- PR fusionados (30 d)
- 21
Descripción
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)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
En el issue no se mencionan archivos ni tests. Empieza revisando la API de plotting existente y los tests para añadir líneas o trazas; después, compara su comportamiento con la firma de estilo R solicitada. Se considera terminado cuando se puede añadir una línea únicamente a partir de la pendiente/intersección, con opciones para líneas horizontales y verticales, sin requerir valores x muestreados ni una búsqueda manual del rango de los ejes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100