Skip to content

Commit

Permalink
Reexport color() from khroma
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Aug 24, 2024
1 parent 1a44a2c commit 82f77bc
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ S3method(screeplot,PCOA)
S3method(summary,CA)
S3method(summary,PCA)
export(bootstrap)
export(color)
export(label)
export(palette_color_continuous)
export(palette_color_discrete)
Expand Down Expand Up @@ -82,6 +83,7 @@ importFrom(grDevices,chull)
importFrom(grDevices,colorRamp)
importFrom(grDevices,hcl.colors)
importFrom(grDevices,rgb)
importFrom(khroma,color)
importFrom(khroma,palette_color_continuous)
importFrom(khroma,palette_color_discrete)
importFrom(khroma,palette_color_picker)
Expand Down
4 changes: 4 additions & 0 deletions R/reexport.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ arkhe::bootstrap

# REEXPORT FROM KHROMA

#' @importFrom khroma color
#' @export
khroma::color

#' @importFrom khroma palette_color_continuous
#' @export
khroma::palette_color_continuous
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ viz_tolerance(
viz_individuals(
x = X,
extra_quanti = iris$Petal.Length,
color = khroma::color("iridescent")(255),
color = color("iridescent")(255),
size = c(1, 2)
)
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ viz_tolerance(
viz_individuals(
x = X,
extra_quanti = iris$Petal.Length,
color = khroma::color("iridescent")(255),
color = color("iridescent")(255),
size = c(1, 2)
)
```
Expand Down
Binary file modified man/figures/README-biplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-plot-var-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/pca.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ viz_hull(x = X, group = iris$Species, level = 0.95,
viz_individuals(
x = X,
extra_quanti = iris$Petal.Length,
color = khroma::color("YlOrBr")(12), # Custom color scale
color = color("YlOrBr")(12), # Custom color scale
size = c(1, 2), # Custom size scale
legend = list(x = "bottomleft")
)
Expand All @@ -178,7 +178,7 @@ viz_individuals(
viz_individuals(
x = X,
extra_quanti = "cos2",
color = khroma::color("iridescent")(12), # Custom color scale
color = color("iridescent")(12), # Custom color scale
size = c(1, 2), # Custom size scale
legend = list(x = "bottomleft")
)
Expand Down

0 comments on commit 82f77bc

Please sign in to comment.