bug boxplot set to horizontal
Personne n'a encore pris cette issue.
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hi, I've found a bug in ggplotly() when I want to draw an horizontal boxplot. The code that doesn't work is this:
au2= ggplot(data) + geom_boxplot(aes_string(x = "Conc", y ="Class"))+
labs( x = "log2(Concentration)", title = "Density boxplot")
plotly::ggplotly(au2)
where "Conc" is continous and "Class" is discrete. ggplot correctly draw the graph, but when I use ggplotly(), the plot is almost empty (becomes empty if I put also fill = "Class")
in ggplot works fine:

in plotly doesn't work:

If I reverse x and y everything works fine but the boxplot will be vertical. So in order to make an horizontal boxplot that kinda works in plotly I have to use coord_flip() in ggplot2. So this code:
au2 = ggplot(box_data) + geom_boxplot(aes_string(y = "Conc", x ="Class")) +
labs( x = "log2(Concentration)", title = "Density boxplot") + coord_flip()
plotly::ggplotly(au2)
But I have a last problem with ticks. They are a bit rotated:
problem with ticks in plotly:

What's happening??
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire le boxplot horizontal signalé avec ggplot(), geom_boxplot() et plotly::ggplotly(), en comparant le mappage horizontal direct avec le contournement coord_flip(). Étudiez la gestion des axes continus et discrets, de fill et des libellés des graduations ; le travail est terminé lorsque les boxplots horizontaux sont correctement rendus avec fill et que leurs graduations sont orientées comme prévu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100