Closed grantmcdermott closed 1 year ago
Looks fantastic! Well done!
Two examples:
library(plot2)
palette("Tableau 10")
palette(adjustcolor(palette() , 0.3))
# Should `col` accept "by"?
plot2(
Sepal.Length ~ Petal.Length | Species, iris,
pch = 21,
col = "by",
)
# Error in plot.xy(xy.coords(x, y), type = type, ...): invalid color name 'by'
# Default looks really pale on my screen
plot2(Petal.Length ~ Sepal.Length | Species, iris)
Looks really great overall. I left some comments. Once you've made decisions on those, I won't have anything else to add and think it's good to merge.
Super, thanks @vincentarelbundock.
Minor aside RE the paleness of this palette. That should be resolved by selecting a solid point type (e.g., pch = 19
). Or, by keeping the filled point type (pch = 21
) but explicitly selecting some fill (e.g. bg = "by" / bg = "grey", etc.)
Closes #48. Closes #49.
In addition to specifying these parameters manually, this PR also permits
bg = "by"
(similar to existing "by" keyword support forlty
andpch
).I haven't added
cex = "by"
keword support yet, because I need to solve the potential problem of dual legend placement, e.g. one legend for colors and another for cex/size. However, once that's been cracked then it should be fairly trivial to support "bubble" plot types (c.f., #29).Quick example of what this PR allows:
Created on 2023-07-28 with reprex v2.0.2