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

plotReducedDim hex #209

Closed
DarioS opened this issue Jun 21, 2024 · 4 comments
Closed

plotReducedDim hex #209

DarioS opened this issue Jun 21, 2024 · 4 comments

Comments

@DarioS
Copy link

DarioS commented Jun 21, 2024

hex: Logical, whether to use geom_hex. Note that geom_hex is broken in ggplot2 version 3.4.0.

What about ggplot2 version 3.5.1? I don't see any open issues at ggplot2 Issue Tracker regarding this. But, it doesn't work for me.

@alanocallaghan
Copy link
Owner

Can you be in any way more specific, posting perhaps a reproducible example, expected outputs, your scater version, etc?

@DarioS
Copy link
Author

DarioS commented Jun 21, 2024

I thought that it was an established issue package maintainer is tracking. Regardless, I copied and pasted example code.

library(scater)
example_sce <- mockSCE()
example_sce <- logNormCounts(example_sce)
example_sce <- runPCA(example_sce)
plotPCA(example_sce, hex = TRUE) # I modified the function's example code by specifying the hex parameter.

The result is identical to when hex is unspecified. I used scater version 1.32 and ggplot2 version 3.5.1 in R version 4.4.0.

@alanocallaghan
Copy link
Owner

plotPCA(example_sce, hex = TRUE, bins=2)

@alanocallaghan
Copy link
Owner

alanocallaghan commented Jun 21, 2024

\item{bins}{Number of bins, can be different in x and y, to bin and summarize
the points and their values, to avoid overplotting. If \code{NULL}
(default), then the points are plotted without binning. Only used when both
x and y are numeric.}

The documentation makes this clear. I guess I could change the bins argument default to be something like if (hex) 20 else NULL but I don't fancy introducing complex dependencies between function arguments at the moment. And anyways it'll bin2d it even if not hex.

I thought that it was an established issue package maintainer is tracking. Regardless, I copied and pasted example code.

The code in this repo has a pretty broad history, most of it nothing to do with me. I've been maintaining it for about 4 years since my PhD, which was in single cell data. I also maintain parts of OSCA, and a few smaller Bioc packages. I've not had a day job directly related to single cell for about 2 years, and as of 2023 my day job isn't even related to R. As such there are likely to be plenty of issues I'm not familiar with; things that may have once been an issue but were solved by somebody else years ago, etc.

Most of the time when I'm looking at issues related to these projects, I am switching from a totally different context (mainly python/groovy/Java programming in image analysis these days). It is helpful for me if I can look at an issue, immediately identify what the problem is, what the expected outcome/output is, and how the problem might have come about. Even if it seems quite obvious to you, I assure you that when I am switching from my main job to have a look at an R problem, it is usually not obvious at all.

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

2 participants