plotly / plotly/plotly.R

xaxis/yaxis in layout of subplots does only apply to first subplot instead of all subplots

Abierto
#2,137 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
R
Estrellas
2.7k
Forks
641
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

In https://plotly.com/r/subplots/#customizing-subplot-axes it is described, that xaxis/yaxis apply to all axis in the subplots.

After a figure with subplots is created using the subplot function, its axis properties (title, font, range, grid style, etc.) can be customized using the xaxis and yaxis graph object figure methods. By default, these methods apply to all of the x axes or y axes in the figure. The row and col arguments can be used to control which axes are targeted by the update.

As it can be seen at the example, it only aplies to the first subplot. A shorter example with the use of ggplotly is provided below. There the layout only works for the first row and first column.

ggplot(data = mtcars, aes(x = hp, y = mpg, color = am)) +
  geom_point() +
  facet_grid(cyl ~ gear, labeller = label_both) +
  theme_light()
ggplotly() %>% layout(xaxis = list(tickmode = "auto"), yaxis = list(tickmode = "auto"))

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el comportamiento documentado de los ejes de subplot y reproduce el problema usando el ejemplo proporcionado con ggplot2, facet_grid, ggplotly() y layout(). Rastrea cómo se aplican las actualizaciones de layout de xaxis y yaxis, y luego verifica que las actualizaciones afecten a todos los ejes de los subplots y no solo a la primera fila y columna.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data-visualization
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.