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

More flexible tooling for arbitrary line additions #22

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

j-andrews7
Copy link
Contributor

@j-andrews7 j-andrews7 commented Jul 21, 2024

As mentioned in #17, this breaks out the line additions to their own functions in utils_plot_mods.R. Biggest changes are the addition of arbitrary ablines, linewidth and opacity parameters, doc additions, and a bit of code refactoring.

It also explicitly mentions that any of the line parameters can accept a vector of the same length of the lines being added to style each individually, e.g.:

scatterPlot(
         example_df, x.by = "PC1", y.by = "PC2",
         color.by = "gene1",
         size = 3, add.xline = c(-1, 0, 1), xline.color = c("blue", "red", "green"), 
         xline.linetype = c("dotdash", "dashed", "solid"), xline.opacity = 0.7, xline.linewidth = c(1, 2, 3),
         add.yline = c(-2, 2), yline.color = "magenta", 
         add.abline = c(0, 1), abline.slope = c(1, -0.5), abline.linewidth = 1,
         abline.color = c("skyblue", "darkred"), split.by = "groups")

image

Think this is ready for review, tests pass.

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.

1 participant