Italicizing strip.text with ggplotly
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
I've been trying to get the labels on a faceted grid to be italicized on the y-axis and can't seem to make it to happen.
Here I'll use the "Free Y Axis" example of a faceted grid as written by Plotly:
https://plotly.com/ggplot2/facet_grid/
The only change I've made to this code is make the strip text for both axes larger and the y-axis text italicized in the ggplot theme().
library(reshape2)
library(ggplot2)
library(plotly)
p <- ggplot(tips, aes(x=total_bill)) + geom_histogram(binwidth=2,colour="white")
# With panels that have the same scaling, but different range (and therefore different physical sizes)
p <- p + facet_grid(sex ~ smoker, scales="free", space="free") +
theme(strip.text.x = element_text(size = 13),
strip.text.y = element_text(size = 13,face = "italic"))
p
fig <- ggplotly(p)
fig
The plot produced by ggplot (p) looks like this, with the y-axis facet labels in italics:

The plot produced by ggplotly (fig) looks like this:

Any clarification if I'm missing something would be appreciated. Thank you!
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
Comienza con el ejemplo proporcionado „Free Y Axis“ y compara el objeto ggplot p con el resultado de ggplotly fig, centrándote en cómo se convierte el estilo del texto de las bandas de las facetas. Reproduce el estilo cursivo que falta en las etiquetas de las facetas del eje y; se considera terminado cuando ggplotly conserva el estilo cursivo y mantiene el texto más grande de la banda.
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
- Bien especificado
- Aptitud para principiantes
- 45/100