Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dittoPlot()s nolonger render as intended when do.hover = TRUE #104

Open
dtm2451 opened this issue Jan 20, 2022 · 1 comment
Open

dittoPlot()s nolonger render as intended when do.hover = TRUE #104

dtm2451 opened this issue Jan 20, 2022 · 1 comment

Comments

@dtm2451
Copy link
Owner

dtm2451 commented Jan 20, 2022

There have always been some differences after plotly conversion, but it's definitely gotten worse than before. (Before: seemed to just be that boxplots always showed outliers in the past, and jitter points have fills. Not too bad!)

library(dittoSeq)
example("importDittoBulk", echo = FALSE)

# do.hover = FALSE
dittoPlot(myRNA, "gene1", "SNP", "timepoint", shape.by = "timepoint",
          plots = c("vlnplot", "boxplot", "jitter"), jitter.size = 3)

image

# do.hover = TRUE
dittoPlot(myRNA, "gene1", "SNP", "timepoint", shape.by = "timepoint",
          plots = c("vlnplot", "boxplot", "jitter"), jitter.size = 3,
          do.hover = TRUE)

newplot

Multiple bits here...

  • Diagonal jitter banding: seems to be related to aes(text) not being successfully ignored by geom_jitter(). Potentially can fix by using plotly machinery to adjust hover info after ggplotly conversion.
  • violin and boxplot width/position issues only come into play when color.by is used to create sub-groupings:
    • boxplots don't dodge at all. need to investigate cause/fix
    • violin plot widths are not reduced accordingly. need to investigate cause/fix
@dtm2451
Copy link
Owner Author

dtm2451 commented Mar 15, 2024

There are still some render differences, e.g. boxplots cannot be plotted in front of violin plots or jittered points, no matter what order they are given to the plots input, and boxplot outliers do not get turned off regardless of what's given to boxplot.show.outliers.

Diagonal jitter banding has been fixed in dittoViz, and will make it into the next major release of dittoSeq, where dittoViz functions will replace most dittoSeq visualization code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant