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

Support add=TRUE #60

Merged
merged 5 commits into from
Aug 14, 2023
Merged

Support add=TRUE #60

merged 5 commits into from
Aug 14, 2023

Conversation

grantmcdermott
Copy link
Owner

@grantmcdermott grantmcdermott commented Aug 14, 2023

Closes #55. Simplifies things by ignoring the legend for any added elements. (Maybe we can revisit down the line.)

Simple penguins example.

library(plot2)
par(pch = 15)

data(penguins, package = "palmerpenguins")

plot2(bill_depth_mm ~ bill_length_mm | species, penguins, pch = "by", grid = TRUE)

penguins$pred = predict(lm(bill_depth_mm ~ bill_length_mm * species, penguins), newdata = penguins)

plot2(pred ~ bill_length_mm | species, penguins, type = "l", add = TRUE)

Created on 2023-08-13 with reprex v2.0.2

@grantmcdermott grantmcdermott marked this pull request as ready for review August 14, 2023 05:34
@grantmcdermott grantmcdermott merged commit 0c7db77 into main Aug 14, 2023
5 checks passed
@grantmcdermott grantmcdermott deleted the add=TRUE branch August 14, 2023 05:35
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.

Support plot2(..., add = TRUE)
1 participant