Skip to content

Make scatterplot public - #286

Merged
stemangiola merged 2 commits into
masterfrom
make-scatterplot-public
Jul 21, 2026
Merged

Make scatterplot public#286
stemangiola merged 2 commits into
masterfrom
make-scatterplot-public

Conversation

@stemangiola

Copy link
Copy Markdown
Collaborator

No description provided.

…s against continuous covariates. Enhance documentation and examples for new function, and update introduction vignette to reference sccomp_scatterplot. Adjust plot.sccomp_tbl to utilize the new scatterplot function for continuous factors.
…visualizing cell-group proportions against continuous covariates. Documented the function in the introduction vignette, enhancing user guidance for its application.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the continuous-covariate scatterplot functionality publicly available as sccomp_scatterplot(), updates the default plot() method to use it for numeric covariates, and documents/tests the new public API.

Changes:

  • Exported and documented sccomp_scatterplot() for visualising proportions vs continuous covariates.
  • Updated plot.sccomp_tbl() to route numeric covariates to sccomp_scatterplot() and discrete covariates to sccomp_boxplot().
  • Added vignette section and test coverage for the new scatterplot.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vignettes/introduction.Rmd Documents use of sccomp_scatterplot() for continuous covariates and ensures sccomp_test() is run before plotting.
tests/testthat/test-plot.R Adds tests asserting sccomp_scatterplot() returns a ggplot object (with and without unwanted-effect removal).
R/plot.R Updates plot.sccomp_tbl() to delegate to sccomp_scatterplot() for numeric covariates and sccomp_boxplot() for discrete ones.
R/plot_scatterplot.R Introduces exported sccomp_scatterplot() wrapper around the existing internal scatterplot implementation.
NAMESPACE Exports sccomp_scatterplot.
man/sccomp_scatterplot.Rd Adds generated Rd documentation for sccomp_scatterplot().
inst/NEWS.rd Announces the new exported scatterplot function and vignette update.
DESCRIPTION Bumps package version to 2.1.34.
Files not reviewed (1)
  • man/sccomp_scatterplot.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/plot.R
if(attr(x, "count_data") |> select(all_of(.x)) |> pull(1) |> is("numeric"))
my_plot =
plot_scatterplot(
sccomp_scatterplot(
Comment thread R/plot.R
@@ -135,8 +104,7 @@ plot.sccomp_tbl <- function(
)
Comment thread R/plot_scatterplot.R
Comment on lines +117 to +118
) +
ggtitle(sprintf("Grouped by %s (for multi-factor models, associations could be hardly observable with unidimensional data stratification)", factor))
@stemangiola
stemangiola merged commit c807411 into master Jul 21, 2026
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants