[CHNOSZ-commits] r736 - in pkg/CHNOSZ: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 22 08:33:37 CEST 2022
Author: jedick
Date: 2022-07-22 08:33:37 +0200 (Fri, 22 Jul 2022)
New Revision: 736
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/stack_mosaic.R
pkg/CHNOSZ/man/stack_mosaic.Rd
Log:
stack_mosaic(): Add 'plot.it' argument
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2022-07-21 04:22:25 UTC (rev 735)
+++ pkg/CHNOSZ/DESCRIPTION 2022-07-22 06:33:37 UTC (rev 736)
@@ -1,6 +1,6 @@
-Date: 2022-07-21
+Date: 2022-07-22
Package: CHNOSZ
-Version: 1.9.9-28
+Version: 1.9.9-29
Title: Thermodynamic Calculations and Diagrams for Geochemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/R/stack_mosaic.R
===================================================================
--- pkg/CHNOSZ/R/stack_mosaic.R 2022-07-21 04:22:25 UTC (rev 735)
+++ pkg/CHNOSZ/R/stack_mosaic.R 2022-07-22 06:33:37 UTC (rev 736)
@@ -6,7 +6,8 @@
# (default of NA for col[3] means to plot species12 boundaries with color for species2)
# ...: Arguments for mosaic() (incl. affinity() arguments)
stack_mosaic <- function(bases, species1, species2, species12, names = NULL, col = list(4, 3, 6), col.names = list(4, 3, 6),
- fill = NULL, dx = list(0, 0, 0), dy = list(0, 0, 0), srt = list(0, 0, 0), lwd = list(1, 1, 1), lty = list(1, 1, 1), ...) {
+ fill = NULL, dx = list(0, 0, 0), dy = list(0, 0, 0), srt = list(0, 0, 0), lwd = list(1, 1, 1), lty = list(1, 1, 1),
+ plot.it = TRUE, ...) {
# Default is to use semi-transparent fill for bimetallic species
if(is.null(fill)) fill <- list(NA, NA, add_alpha(col.names[3], "50"))
@@ -17,7 +18,7 @@
mosaic1 <- mosaic(bases, ...)
# Show predominance fields
diagram1 <- diagram(mosaic1$A.species, names = names[[1]], col = col[[1]], col.names = col.names[[1]], fill = fill[[1]],
- dx = dx[[1]], dy = dy[[1]], srt = srt[[1]], lwd = lwd[[1]], lty = lty[[1]])
+ dx = dx[[1]], dy = dy[[1]], srt = srt[[1]], lwd = lwd[[1]], lty = lty[[1]], plot.it = plot.it)
# Load species12 (bimetallic species) and species2 (second metal-bearing species)
species(c(species12, species2))
@@ -39,7 +40,7 @@
lty <- c(rep_len(lty[[3]], length(species12)), rep_len(lty[[2]], length(species2)))
fill <- c(rep_len(fill[[3]], length(species12)), rep_len(fill[[2]], length(species2)))
diagram2 <- diagram(mosaic2$A.species, add = TRUE, names = names, col = col, col.names = col.names, fill = fill,
- dx = dx, dy = dy, srt = srt, lwd = lwd, lty = lty)
+ dx = dx, dy = dy, srt = srt, lwd = lwd, lty = lty, plot.it = plot.it)
out <- list(diagram1, diagram2)
invisible(out)
Modified: pkg/CHNOSZ/man/stack_mosaic.Rd
===================================================================
--- pkg/CHNOSZ/man/stack_mosaic.Rd 2022-07-21 04:22:25 UTC (rev 735)
+++ pkg/CHNOSZ/man/stack_mosaic.Rd 2022-07-22 06:33:37 UTC (rev 736)
@@ -12,7 +12,7 @@
stack_mosaic(bases, species1, species2, species12, names = NULL,
col = list(4, 3, 6), col.names = list(4, 3, 6), fill = NULL,
dx = list(0, 0, 0), dy = list(0, 0, 0), srt = list(0, 0, 0),
- lwd = list(1, 1, 1), lty = list(1, 1, 1), ...)
+ lwd = list(1, 1, 1), lty = list(1, 1, 1), plot.it = TRUE, ...)
add_alpha(col, alpha)
}
@@ -30,6 +30,7 @@
\item{srt}{label rotation}
\item{lwd}{line width}
\item{lty}{line type}
+ \item{plot.it}{make plots?}
\item{...}{arguments for \code{\link{mosaic}} and \code{\link{affinity}}}
\item{alpha}{character, hexadecimal value of color transparency (alpha)}
}
More information about the CHNOSZ-commits
mailing list