diff --git a/dev/articles/Ternary.html b/dev/articles/Ternary.html index c6f012e..0c439f3 100644 --- a/dev/articles/Ternary.html +++ b/dev/articles/Ternary.html @@ -191,7 +191,7 @@

Plot two stylised pl I = c(92, 12, 243), V = c(225, 24, 208) ) -AddToTernary(graphics::points, data_points, pch = 21, cex = 2.8, +AddToTernary(points, data_points, pch = 21, cex = 2.8, bg = vapply(data_points, function (x) rgb(x[1], x[2], x[3], 128, maxColorValue = 255), @@ -259,7 +259,7 @@

Styling points # Define a colour spectrum spectrumBins <- 255 # Number of bins to use -mySpectrum <- viridisLite::viridis(spectrumBins) +mySpectrum <- rowCol <- hcl.colors(spectrumBins, palette = "viridis") # Cut our reflectance data into categories binnedReflectance <- cut(dat$reflectance, spectrumBins) @@ -298,7 +298,7 @@

Styling points ), bty = "n", # No framing box xpd = NA, # Don't clip at margins - # title.font = 2, # Bold. Supported from R 3.6 onwards + title.font = 2, # Bold title = "Reflectance" ) @@ -312,43 +312,11 @@

Styling points "\u03bcm" # µm ), title = "Grain size", - # title.font = 2, # Bold. Supported from R 3.6 onwards + title.font = 2, # Bold bty = "n", # Do not frame with box cex = 0.8 ) -

+

See the “Points” tab of the shiny app for a point-and-click implementation.

@@ -399,24 +367,12 @@

ContoursPlotTools::SpectrumLegend( "topleft", legend = round(seq(zRange[1], zRange[2], length.out = 4), 3), - palette = viridisLite::viridis(256L, alpha = 0.6), + palette = hcl.colors(265, palette = "viridis", alpha = 0.6), bty = "n", # No framing box inset = 0.02, xpd = NA # Do not clip at edge of figure ) -

+

or according to the density of points across the plot:

 par(mar = rep(0.2, 4))
diff --git a/dev/articles/Ternary_files/figure-html/contours-1.png b/dev/articles/Ternary_files/figure-html/contours-1.png
index aa268c4..f34ea38 100644
Binary files a/dev/articles/Ternary_files/figure-html/contours-1.png and b/dev/articles/Ternary_files/figure-html/contours-1.png differ
diff --git a/dev/articles/Ternary_files/figure-html/density-contours-1.png b/dev/articles/Ternary_files/figure-html/density-contours-1.png
index 4675dc9..66caacc 100644
Binary files a/dev/articles/Ternary_files/figure-html/density-contours-1.png and b/dev/articles/Ternary_files/figure-html/density-contours-1.png differ
diff --git a/dev/articles/Ternary_files/figure-html/low-resolution-density-contours-1.png b/dev/articles/Ternary_files/figure-html/low-resolution-density-contours-1.png
index e91f8f8..3576d97 100644
Binary files a/dev/articles/Ternary_files/figure-html/low-resolution-density-contours-1.png and b/dev/articles/Ternary_files/figure-html/low-resolution-density-contours-1.png differ
diff --git a/dev/articles/Ternary_files/figure-html/point-styling-1.png b/dev/articles/Ternary_files/figure-html/point-styling-1.png
index 5514bbb..3f5a8c4 100644
Binary files a/dev/articles/Ternary_files/figure-html/point-styling-1.png and b/dev/articles/Ternary_files/figure-html/point-styling-1.png differ
diff --git a/dev/articles/interpolation_files/figure-html/contours-by-calculation-1.png b/dev/articles/interpolation_files/figure-html/contours-by-calculation-1.png
index 940622c..c723a74 100644
Binary files a/dev/articles/interpolation_files/figure-html/contours-by-calculation-1.png and b/dev/articles/interpolation_files/figure-html/contours-by-calculation-1.png differ
diff --git a/dev/articles/interpolation_files/figure-html/convex-hull-1.png b/dev/articles/interpolation_files/figure-html/convex-hull-1.png
index aaa1f65..eeab26a 100644
Binary files a/dev/articles/interpolation_files/figure-html/convex-hull-1.png and b/dev/articles/interpolation_files/figure-html/convex-hull-1.png differ
diff --git a/dev/articles/interpolation_files/figure-html/idw-interpolation-1.png b/dev/articles/interpolation_files/figure-html/idw-interpolation-1.png
index 84acc5c..918db77 100644
Binary files a/dev/articles/interpolation_files/figure-html/idw-interpolation-1.png and b/dev/articles/interpolation_files/figure-html/idw-interpolation-1.png differ
diff --git a/dev/news/index.html b/dev/news/index.html
index 46b77c5..8dce007 100644
--- a/dev/news/index.html
+++ b/dev/news/index.html
@@ -83,6 +83,8 @@ 

Changelog

  • Support plotting of c(0, 0, 0), at origin.
  • +
  • Remove ‘viridis’ dependency.
  • +
  • Require R 3.6.
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 50fc107..53e8797 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -7,7 +7,7 @@ articles: interpolation: interpolation.html new-users: new-users.html Ternary: Ternary.html -last_built: 2024-08-05T11:33Z +last_built: 2024-08-05T12:49Z urls: reference: https://ms609.github.io/Ternary/reference article: https://ms609.github.io/Ternary/articles diff --git a/dev/reference/ColourTernary-1.png b/dev/reference/ColourTernary-1.png index f42b766..4791ccb 100644 Binary files a/dev/reference/ColourTernary-1.png and b/dev/reference/ColourTernary-1.png differ diff --git a/dev/reference/ColourTernary.html b/dev/reference/ColourTernary.html index bbcb681..36161ab 100644 --- a/dev/reference/ColourTernary.html +++ b/dev/reference/ColourTernary.html @@ -88,7 +88,7 @@

Colour a ternary plot according to the output of a function

ColourTernary(
   values,
-  spectrum = viridisLite::viridis(256L, alpha = 0.6),
+  spectrum = hcl.colors(256L, palette = "viridis", alpha = 0.6),
   resolution = sqrt(ncol(values)),
   direction = getOption("ternDirection", 1L),
   legend,
@@ -97,7 +97,7 @@ 

Colour a ternary plot according to the output of a function

ColorTernary( values, - spectrum = viridisLite::viridis(256L, alpha = 0.6), + spectrum = hcl.colors(256L, palette = "viridis", alpha = 0.6), resolution = sqrt(ncol(values)), direction = getOption("ternDirection", 1L), legend, diff --git a/dev/reference/Rplot002.png b/dev/reference/Rplot002.png index 2cdbca1..d26bdfb 100644 Binary files a/dev/reference/Rplot002.png and b/dev/reference/Rplot002.png differ diff --git a/dev/reference/Rplot003.png b/dev/reference/Rplot003.png index 1f1c0e2..0801d2c 100644 Binary files a/dev/reference/Rplot003.png and b/dev/reference/Rplot003.png differ diff --git a/dev/reference/TernaryContour-1.png b/dev/reference/TernaryContour-1.png index 46de19a..aec1cfa 100644 Binary files a/dev/reference/TernaryContour-1.png and b/dev/reference/TernaryContour-1.png differ diff --git a/dev/reference/TernaryContour-2.png b/dev/reference/TernaryContour-2.png index 9fe402f..38ec77f 100644 Binary files a/dev/reference/TernaryContour-2.png and b/dev/reference/TernaryContour-2.png differ diff --git a/dev/reference/TernaryContour-3.png b/dev/reference/TernaryContour-3.png index 199ae4f..4d60919 100644 Binary files a/dev/reference/TernaryContour-3.png and b/dev/reference/TernaryContour-3.png differ diff --git a/dev/reference/TernaryContour.html b/dev/reference/TernaryContour.html index 8b3134a..a9472fd 100644 --- a/dev/reference/TernaryContour.html +++ b/dev/reference/TernaryContour.html @@ -98,7 +98,7 @@

Add contours to a ternary plot

nlevels = 10, levels = pretty(zlim, nlevels), zlim, - color.palette = function(n) viridisLite::viridis(n, alpha = 0.6), + color.palette = function(n) hcl.colors(n, palette = "viridis", alpha = 0.6), fill.col = color.palette(length(levels) - 1), func... = list(), ... @@ -238,7 +238,7 @@

Examples

# Fill the contour areas, rather than using tiles TernaryContour(GeneralMax, filled = TRUE, legend = c("Max", "...", "Min"), legend... = list(bty = "n"), - fill.col = viridisLite::viridis(14, alpha = 0.6)) + fill.col = hcl.colors(14, palette = "viridis", alpha = 0.6)) # Re-draw edges of plot triangle over fill TernaryPolygon(diag(3)) diff --git a/dev/reference/TernaryDensityContour-1.png b/dev/reference/TernaryDensityContour-1.png index 673fb7b..3b5d03d 100644 Binary files a/dev/reference/TernaryDensityContour-1.png and b/dev/reference/TernaryDensityContour-1.png differ diff --git a/dev/reference/TernaryDensityContour.html b/dev/reference/TernaryDensityContour.html index c5354f5..a20cedf 100644 --- a/dev/reference/TernaryDensityContour.html +++ b/dev/reference/TernaryDensityContour.html @@ -99,7 +99,7 @@

Add contours of estimated point density to a ternary plot

nlevels = 10, levels = pretty(zlim, nlevels), zlim, - color.palette = function(n) viridisLite::viridis(n, alpha = 0.6), + color.palette = function(n) hcl.colors(n, palette = "viridis", alpha = 0.6), fill.col = color.palette(length(levels) - 1), ... )
diff --git a/dev/reference/TernaryPointValues-2.png b/dev/reference/TernaryPointValues-2.png index 906c195..9246ec5 100644 Binary files a/dev/reference/TernaryPointValues-2.png and b/dev/reference/TernaryPointValues-2.png differ