[CHNOSZ-commits] r866 - in pkg/CHNOSZ: . R demo inst man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 7 13:58:36 CET 2025
Author: jedick
Date: 2025-01-07 13:58:35 +0100 (Tue, 07 Jan 2025)
New Revision: 866
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/diagram.R
pkg/CHNOSZ/demo/DEW.R
pkg/CHNOSZ/demo/contour.R
pkg/CHNOSZ/demo/gold.R
pkg/CHNOSZ/demo/minsol.R
pkg/CHNOSZ/demo/solubility.R
pkg/CHNOSZ/demo/sphalerite.R
pkg/CHNOSZ/demo/sum_S.R
pkg/CHNOSZ/inst/NEWS.Rd
pkg/CHNOSZ/man/diagram.Rd
pkg/CHNOSZ/man/solubility.Rd
pkg/CHNOSZ/vignettes/anintro.Rmd
pkg/CHNOSZ/vignettes/multi-metal.Rmd
Log:
diagram() now defaults to type = "loga.balance" for solubilities
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/DESCRIPTION 2025-01-07 12:58:35 UTC (rev 866)
@@ -1,6 +1,6 @@
-Date: 2024-12-29
+Date: 2025-01-07
Package: CHNOSZ
-Version: 2.1.0-37
+Version: 2.1.0-38
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/diagram.R
===================================================================
--- pkg/CHNOSZ/R/diagram.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/R/diagram.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -1,4 +1,5 @@
# CHNOSZ/diagram.R
+
# Plot equilibrium chemical activity and predominance diagrams
# 20061023 jmd v1
# 20120927 work with output from either equil() or affinity(),
@@ -46,8 +47,8 @@
if(length(efun) == 0) efun <- ""
if(!(efun %in% c("affinity", "rank.affinity", "equilibrate") | grepl("solubilit", efun)))
stop("'eout' is not the output from one of these functions: affinity, rank.affinity, equilibrate, or solubility")
- # For solubilities(), default type is loga.balance 20210303
- if(grepl("solubilities", efun) & missing(type)) type <- "loga.balance"
+ # For solubility(), default type is loga.balance 20210303
+ if(grepl("solubilit", efun) & missing(type)) type <- "loga.balance"
# Check balance argument for rank.affinity() 20220416
if(efun == "rank.affinity") {
if(!identical(balance, 1)) {
@@ -58,11 +59,11 @@
}
## 'type' can be:
- # 'auto' - property from affinity() (1D) or maximum affinity (affinity 2D) (aout) or loga.equil (eout)
- # 'loga.equil' - equilibrium activities of species of interest (eout)
- # name of basis species - equilibrium activity of a basis species (aout)
- # 'saturation' - affinity=0 line for each species (2D)
- # 'loga.balance' - activity of balanced basis species (eout from solubility() or solubilities())
+ # 'auto' - values returned by affinity() (aout)
+ # 'loga.equil' - activities of formed species (eout from equilibrate() or solubility())
+ # name of basis species - activity of a basis species (aout)
+ # 'saturation' - affinity=0 line for each species (aout)
+ # 'loga.balance' - total activities of formed species (eout from solubility())
eout.is.aout <- FALSE
plot.loga.basis <- FALSE
if(type %in% c("auto", "saturation")) {
@@ -203,7 +204,9 @@
## Identify predominant species
predominant <- NA
H2O.predominant <- NULL
- if(plotvar %in% c("loga.equil", "alpha", "A/(2.303RT)", "rank.affinity") & type != "saturation") {
+ # Whether we're considering multiple species, based on the plotting variable
+ pv_multi <- plotvar %in% c("loga.equil", "alpha", "A/(2.303RT)", "rank.affinity") & type != "saturation"
+ if(pv_multi) {
pv <- plotvals
# Some additional steps for affinity values, but not for equilibrated activities
if(eout.is.aout) {
Modified: pkg/CHNOSZ/demo/DEW.R
===================================================================
--- pkg/CHNOSZ/demo/DEW.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/DEW.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -180,11 +180,7 @@
names[c(4, 5, 7, 9)] <- ""
col <- rep("black", length(names))
col[c(1, 3, 6, 8, 10)] <- c("red", "darkgreen", "purple", "orange", "navyblue")
-if(packageVersion("CHNOSZ") > "1.1.3") {
- diagram(e, alpha = "balance", names = names, col = col, ylim = c(0, 0.8), ylab = "carbon fraction", spline.method = "natural")
-} else {
- diagram(e, alpha = "balance", names = names, col = col, ylim = c(0, 0.8), ylab = "carbon fraction")
-}
+diagram(e, alpha = "balance", names = names, col = col, ylim = c(0, 0.8), ylab = "carbon fraction", spline.method = "natural")
## Add legend and title
ltxt1 <- "P = 50000 bar"
Modified: pkg/CHNOSZ/demo/contour.R
===================================================================
--- pkg/CHNOSZ/demo/contour.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/contour.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -25,9 +25,10 @@
# Calculate affinity with changing basis species
bases <- c("H2S", "HS-", "HSO4-", "SO4-2")
m <- mosaic(bases, pH = c(2, 10, res), O2 = c(-41, -29, res), T = T, P = P, IS = NaCl$IS, blend = blend)
-# Show predominance fields
-diagram(m$A.bases, col = "red", col.names = "red", lty = 2, italic = TRUE)
-diagram(m$A.species, add=TRUE, col = "blue", col.names = "blue", lwd = 2, bold = TRUE)
+# Show predominance fields for S-species
+diagram(m$A.bases, col = 4, col.names = 4, lty = 2, italic = TRUE)
+# Show predominance fields for Au-species
+diagram(m$A.species, add=TRUE, col = 2, col.names = 2, lwd = 2, bold = TRUE)
# Calculate and plot solubility of Au (use named 'bases' argument to trigger mosaic calculation)
species("Au")
@@ -34,7 +35,7 @@
s <- solubility(iaq, bases = bases, pH = c(2, 10, res), O2 = c(-41, -29, res), T = T, P = P, IS = NaCl$IS, blend = blend)
# Convert to ppb
s <- convert(s, "ppb")
-diagram(s, type = "loga.balance", levels = c(1, 10, 100, 1000), add = TRUE)
+diagram(s, levels = c(1, 10, 100, 1000), add = TRUE)
# Add legend and title
dP <- describe.property(c("T", "P"), c(250, 500))
legend("top", dP, bty = "n", inset = c(0, 0.06))
Modified: pkg/CHNOSZ/demo/gold.R
===================================================================
--- pkg/CHNOSZ/demo/gold.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/gold.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -60,8 +60,8 @@
# (set IS = 0 for diagram to show "log m" instead of "log a")
s <- solubility(iaq, pH = c(3, 8), T = 300, P = 1000, IS = 0)
# Make diagram and show total log molality
- diagram(s, ylim = c(-10, -5), col = col, lwd = 2, lty = 1)
- diagram(s, add = TRUE, type = "loga.balance", lwd = 3, lty = 2)
+ diagram(s, type = "loga.equil", ylim = c(-10, -5), col = col, lwd = 2, lty = 1)
+ diagram(s, add = TRUE, lwd = 3, lty = 2)
# Add neutral pH line
pH <- -subcrt(c("H2O", "H+", "OH-"), c(-1, 1, 1), T = 300, P = 1000)$out$logK/2
abline(v = pH, lty = 3)
@@ -85,8 +85,8 @@
iaq <- info(c("Au(HS)2-", "AuHS", "AuOH", "AuCl2-"))
s <- solubility(iaq, pH = c(3, 8), T = 450, P = 1000, IS = 0)
# Make diagram and show total log molality
- diagram(s, ylim = c(-8, -3), col = col, lwd = 2, lty = 1)
- diagram(s, add = TRUE, type = "loga.balance", lwd = 3, lty = 2)
+ diagram(s, type = "loga.equil", ylim = c(-8, -3), col = col, lwd = 2, lty = 1)
+ diagram(s, add = TRUE, lwd = 3, lty = 2)
# Add neutral pH line
pH <- -subcrt(c("H2O", "H+", "OH-"), c(-1, 1, 1), T = 450, P = 1000)$out$logK/2
abline(v = pH, lty = 3)
@@ -125,8 +125,8 @@
iaq <- info(c("Au(HS)2-", "AuHS", "AuOH", "AuCl2-"))
s <- solubility(iaq, T = seq(150, 550, 10), `Cl-` = log10(chl$m_Cl), `K+` = log10(chl$m_K), P = 1000, IS = chl$IS)
# Make diagram and show total log molality
- diagram(s, ylim = c(-10, -3), col = col, lwd = 2, lty = 1)
- diagram(s, add = TRUE, type = "loga.balance", lwd = 3, lty = 2)
+ diagram(s, type = "loga.equil", ylim = c(-10, -3), col = col, lwd = 2, lty = 1)
+ diagram(s, add = TRUE, lwd = 3, lty = 2)
# Make legend and title
dP <- describe.property("P", 1000)
dNaCl <- expression(italic(m)[NaCl] == 1.5)
@@ -159,8 +159,8 @@
# bases <- c("H2S", "HS-", "SO4-2", "HSO4-")
# s <- solubility(iaq, bases = bases, T = seq(150, 550, 10), `Cl-` = log10(chl$m_Cl), `K+` = log10(chl$m_K), P = 1000, IS = chl$IS)
# Make diagram and show total log molality
- diagram(s, ylim = c(-10, -3), col = col, lwd = 2, lty = 1)
- diagram(s, add = TRUE, type = "loga.balance", lwd = 3, lty = 2)
+ diagram(s, type = "loga.equil", ylim = c(-10, -3), col = col, lwd = 2, lty = 1)
+ diagram(s, add = TRUE, lwd = 3, lty = 2)
# Make legend and title
dP <- describe.property("P", 1000)
dNaCl <- expression(italic(m)[NaCl] == 1.5)
Modified: pkg/CHNOSZ/demo/minsol.R
===================================================================
--- pkg/CHNOSZ/demo/minsol.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/minsol.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -61,7 +61,6 @@
par(xpd = FALSE)
# Make diagram for minerals only 20201007
-if(packageVersion("CHNOSZ") <= "1.3.6") species(delete = TRUE)
species(icr)
mcr <- mosaic(bases, pH = pH, O2 = O2, T = T, P = P, IS = sat$IS)
diagram(mcr$A.species, col = 2)
@@ -73,7 +72,7 @@
s <- solubility(iaq, bases = bases, pH = pH, O2 = O2, T = T, P = P, IS = sat$IS, in.terms.of = metal)
# Specify contour levels
levels <- seq(-12, 9, 3)
-diagram(s, type = "loga.balance", levels = levels, contour.method = "flattest")
+diagram(s, levels = levels, contour.method = "flattest")
# Show the mineral stability boundaries
diagram(mcr$A.species, names = NA, add = TRUE, lty = 2, col = 2)
Modified: pkg/CHNOSZ/demo/solubility.R
===================================================================
--- pkg/CHNOSZ/demo/solubility.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/solubility.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -28,9 +28,9 @@
iaq <- info(c("CO2", "HCO3-", "CO3-2"))
s <- solubility(iaq, pH = c(pH, res), T = T1, IS = IS)
# First plot total activity line
-diagram(s, ylim = c(-10, 4), type = "loga.balance", lwd = 4, col = "green2")
-# Add activities of species
-diagram(s, ylim=c(-10, 4), add = TRUE, dy = 1)
+diagram(s, ylim = c(-10, 4), lwd = 4, col = "green2")
+# Plot activities of species
+diagram(s, type = "loga.equil", ylim=c(-10, 4), add = TRUE, dy = 1)
# Add legend
lexpr <- as.expression(c("total", expr.species("CO2", state = "aq"),
expr.species("HCO3-"), expr.species("CO3-2")))
@@ -44,7 +44,7 @@
# CO2 T-pH plot
s <- solubility(iaq, pH = c(pH, res), T = c(T, res), IS = IS)
-diagram(s, type = "loga.balance")
+diagram(s)
title(main = substitute("Solubility of"~what, list(what = expr.species("CO2"))))
# Now do calcite
@@ -53,8 +53,8 @@
iaq <- info(c("CO2", "HCO3-", "CO3-2"))
# Optional: use dissociate = 2 to get straight lines like Fig. 4A of Manning et al., 2013
s <- solubility(iaq, pH = c(pH, res), T = T1, IS = IS, dissociate = TRUE)
-diagram(s, ylim = c(-10, 4), type = "loga.balance", lwd = 4, col = "green2")
-diagram(s, add = TRUE, dy = 1)
+diagram(s, ylim = c(-10, 4), lwd = 4, col = "green2")
+diagram(s, type = "loga.equil", add = TRUE, dy = 1)
legend("topright", lty = c(1, 1:3), lwd = c(4, 2, 2, 2),
col = c("green2", rep("black", 3)), legend = lexpr)
title(main = substitute("Solubility of"~what~"at"~T~degree*"C",
@@ -65,7 +65,7 @@
# Calcite T-pH plot
s <- solubility(iaq, pH = c(pH, res), T = c(T, res), IS = IS, dissociate = TRUE)
-diagram(s, type = "loga.balance")
+diagram(s)
title(main = "Solubility of calcite", font.main = 1)
layout(matrix(1))
Modified: pkg/CHNOSZ/demo/sphalerite.R
===================================================================
--- pkg/CHNOSZ/demo/sphalerite.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/sphalerite.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -23,8 +23,8 @@
# Convert log activity to log ppm
sp <- convert(s, "logppm")
- diagram(sp, ylim = c(-5, logppmmax))
- diagram(sp, type = "loga.balance", add = TRUE, lwd = 2, col = "green3")
+ diagram(sp, type = "loga.equil", ylim = c(-5, logppmmax))
+ diagram(sp, add = TRUE, lwd = 2, col = "green3")
# Add water neutrality line
pKw <- - subcrt(c("H2O", "OH-", "H+"), c(-1, 1, 1), T = T, P = P)$out$logK
Modified: pkg/CHNOSZ/demo/sum_S.R
===================================================================
--- pkg/CHNOSZ/demo/sum_S.R 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/demo/sum_S.R 2025-01-07 12:58:35 UTC (rev 866)
@@ -64,7 +64,7 @@
sp <- convert(s, "ppb")
# Plot twice to get deeper colors
for(col in cols) {
- diagram(sp, type = "loga.balance", contour.method = "flattest", levels = 10^(-3:5), add = TRUE, col = col, lty = 3, lwd = 1.8, cex = 1.2)
+ diagram(sp, contour.method = "flattest", levels = 10^(-3:5), add = TRUE, col = col, lty = 3, lwd = 1.8, cex = 1.2)
}
# Add legend and title
Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/inst/NEWS.Rd 2025-01-07 12:58:35 UTC (rev 866)
@@ -15,7 +15,7 @@
\newcommand{\Cp}{\ifelse{latex}{\eqn{C_P}}{\ifelse{html}{\out{<I>C<sub>P</sub></I>}}{Cp}}}
\newcommand{\DG0}{\ifelse{latex}{\eqn{{\Delta}G^{\circ}}}{\ifelse{html}{\out{Δ<I>G</I>°}}{ΔG°}}}
-\section{Changes in CHNOSZ version 2.1.0-37 (2025-01-05)}{
+\section{Changes in CHNOSZ version 2.1.0-38 (2025-01-07)}{
\subsection{OBIGT DEFAULT DATA}{
\itemize{
@@ -110,6 +110,11 @@
\item Merge \file{extdata/adds} and \file{extdata/cpetc} into
\file{extdata/misc}.
+ \item In \code{diagram}, the default for the \strong{type} argument when
+ using the output from \code{solubility} is now \code{loga.balance} (sum
+ of activities of aqueous species) rather than \code{loga.equil}
+ (activities of individual aqueous species).
+
}
}
Modified: pkg/CHNOSZ/man/diagram.Rd
===================================================================
--- pkg/CHNOSZ/man/diagram.Rd 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/man/diagram.Rd 2025-01-07 12:58:35 UTC (rev 866)
@@ -129,14 +129,15 @@
If \code{type} is \samp{saturation}, the function plots the line for each species where the affinity of formation equals zero (see \code{demo("saturation")} for an example).
If for a given species no saturation line is possible or the range of the diagram does not include the saturation line, the function prints a message instead.
If \code{type} is the name of a basis species, then the equilibrium activity of the selected basis species in each of the formation reactions is plotted (see the \CO2-acetic acid example in \code{\link{buffer}}).
-In the case of 2-D diagrams, both of these options use \code{\link{contour}} to draw the lines, with the method specified in \code{contour.method}.
+In the case of 2-D diagrams, both of these options use \code{\link{contour}} to draw the lines, with the method specified in \code{contour.method} and the contour levels specified in \code{levels}.
-This paragraph describes the effect of the \code{type} argument when the output from \code{solubility} is being used.
-For one mineral or gas, if \code{type} set to \samp{auto}, the equilibrium activities of each aqueous species are plotted.
-If \code{type} is \samp{loga.balance}, the activity of the balancing basis species (i.e. total solubility) is plotted; this is represented by contours on a 2-D diagram.
-For two or more minerals or gases, if \code{type} set to \samp{auto}, the values of \samp{loga.balance} (overall minimum solubility) are plotted.
-If \code{type} is \samp{loga.equil}, the solubilities of the individual minerals and gases are plotted.
-For examples that use these features, see \code{\link{solubility}} and various \code{\link{demos}}: \samp{DEW}, \samp{contour}, \samp{gold}, \samp{solubility}, \samp{sphalerite}.
+When \code{eout} is the output from \code{solubility}, the \code{type} argument has different effects depending on the number of mineral (or gas) species being dissolved.
+The default, when \code{type} is \samp{auto}, is to plot the total solubility (total equilibrium activity of aqueous species) taken from the \samp{loga.balance} component of the \code{solubility} output.
+If there are two or more minerals or gases, this corresponds to the overall minimum solubility.
+If \code{type} set to \samp{loga.equil}, then the activities of each aqueous species are plotted if there is one mineral or gas being dissolved.
+However, if there is more than one mineral or gas, then the solubilities of the individual minerals and gases are plotted.
+Solubilities are represented by contours on a 2-D diagram, which can be adjusted using the \code{contour.method} and \code{levels arguments}.
+For examples, see \code{\link{solubility}} and various \code{\link{demos}}: \samp{contour}, \samp{gold}, \samp{solubility}, \samp{sphalerite}, \samp{minsol}, \samp{sum_S}.
}
Modified: pkg/CHNOSZ/man/solubility.Rd
===================================================================
--- pkg/CHNOSZ/man/solubility.Rd 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/man/solubility.Rd 2025-01-07 12:58:35 UTC (rev 866)
@@ -26,15 +26,18 @@
It must be possible to obtain a valid set of basis species by substituting each of the minerals or gases in the first position of the current \code{\link{basis}} defintion, and all of the aqueous species must include that basis species in their formation reactions.
(This essentially means that all minerals, gases and aqueous species must share a common element, which is what the reactions are balanced on.)
-For a single mineral or gas, the output of \code{solubility} can be used by \code{\link{diagram}} with \code{type = NULL} (the default) to plot the activities of the aqueous species or with \code{type = "loga.balance"} to plot the sum of activities of aqueous species, which corresponds to the solubility of the mineral or gas.
-This value corresponds to the total extent of dissolution of the mineral or gas; \code{in.terms.of} can be used to express this value in terms of another species or element.
+For a single mineral or gas, the output of \code{solubility} can be used by \code{\link{diagram}} with \code{type = "loga.balance"} (the default when \code{type} is \samp{auto}) to plot the sum of activities of aqueous species.
+This value corresponds to the solubility of the mineral or gas; \code{in.terms.of} can be used to express this value in terms of another species or element.
For example, for dissolution of gaseous S\s{2}, \code{in.terms.of = "S"} gives the total amount of S in solution, which is twice the amount of S\s{2} dissolved.
Likewise, the solubility of corundum (Al\s{2}O\s{3}) can be expressed in terms of the moles of Al\S{+3} in solution (see the vignette \viglink{anintro}).
+
For multiple minerals, the function calculates the solubilities for each of the minerals separately; these are stored in the \code{loga.equil} element of the output.
The overall \emph{minimum} solubility among all the minerals at each point is stored in \code{loga.balance}.
This corresponds to the total activity of dissolved species in equilibrium with the most stable mineral.
-In contrast to the situation for a single mineral or gas, \code{\link{diagram}} by default plots \code{loga.balance}; \code{type = "loga.equil"} can be used to plot the solubilities for the individual minerals or gases.
+
+Note that \code{\link{diagram}} by default plots \code{loga.balance}.
+Use \code{type = "loga.equil"} in the function call to plot the solubilities for the individual minerals or gases, or the activities of aqueous species when there is one mineral or gas being dissolved.
}
\section{Backward Compatibility}{
@@ -120,13 +123,13 @@
# Make diagrams from the results of solubility calculations
layout(matrix(c(1, 3, 2, 3), nrow = 2))
# Logarithm of activity of aqueous species in equilibrium with SO2(gas)
-diagram(s1, ylim = c(-15, 0))
-diagram(s1, type = "loga.balance", col = 3, lwd = 3, add = TRUE)
+diagram(s1, type = "loga.equil", ylim = c(-15, 0))
+diagram(s1, col = 3, lwd = 3, add = TRUE)
legend("topright", legend = lexpr, bty = "n")
# Logarithm of concentration (parts per million) of aqueous species
sppm <- convert(s1, "logppm")
-diagram(sppm, ylim = c(-10, 5))
-diagram(sppm, type = "loga.balance", col = 3, lwd = 3, add = TRUE)
+diagram(sppm, type = "loga.equil", ylim = c(-10, 5))
+diagram(sppm, col = 3, lwd = 3, add = TRUE)
legend("topright", legend = lexpr, bty = "n")
par(xpd = NA)
text(-58, 6.5, paste("Solubility of gaseous SO2 (green line) is",
Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd 2025-01-07 12:58:35 UTC (rev 866)
@@ -932,8 +932,9 @@
species("corundum")
iaq <- c("Al+3", "AlO2-", "AlOH+2", "AlO+", "HAlO2")
s <- solubility(iaq, pH = c(0, 10), IS = 0, in.terms.of = "Al+3")
-diagram(s, type = "loga.balance", ylim = c(-10, 0), lwd = 4, col = "green3")
-diagram(s, add = TRUE, adj = c(0, 1, 2.1, -0.2, -1.5), dy = c(0, 0, 4, -0.3, 0.1))
+diagram(s, ylim = c(-10, 0), lwd = 4, col = "green3")
+diagram(s, type = "loga.equil", add = TRUE, adj = c(0, 1, 2.1, -0.2, -1.5),
+ dy = c(0, 0, 4, -0.3, 0.1))
legend("topright", c("25 °C", "1 bar"), text.font = 2, bty = "n")
reset()
```
@@ -1589,11 +1590,6 @@
Thank you for reading, and have fun!
-> "The real fun of life is this perpetual testing to realize how far out you can go with any potentialities."
->
-> `r tufte::quote_footer('--- Richard P. Feynman')`
-
-
# Document history
* 2010-09-30 Initial version, titled "Getting started with CHNOSZ".
Modified: pkg/CHNOSZ/vignettes/multi-metal.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/multi-metal.Rmd 2025-01-05 11:12:30 UTC (rev 865)
+++ pkg/CHNOSZ/vignettes/multi-metal.Rmd 2025-01-07 12:58:35 UTC (rev 866)
@@ -834,8 +834,8 @@
T = T, IS = calc$IS, stable = list(dFe$predominant, dCu$predominant))
s <- convert(s, "ppm")
diagram(aFeCu, names = NA, col = "gray", fill = fill)
- diagram(s, type = "loga.balance", levels = 10^(-3:3), add = TRUE)
- diagram(s, type = "loga.balance", levels = 35, add = TRUE, lwd = 3, col = 6, contour.method = NA)
+ diagram(s, levels = 10^(-3:3), add = TRUE)
+ diagram(s, levels = 35, add = TRUE, lwd = 3, col = 6, contour.method = NA)
}
# DIAGRAM 1
mfun()
@@ -880,8 +880,8 @@
s <- convert(s, "ppm")
# DIAGRAM 3
diagram(aFeCu, names = NA, col = "gray", fill = fill)
-diagram(s, type = "loga.balance", levels = 10^(-3:3), add = TRUE)
-diagram(s, type = "loga.balance", levels = 35, add = TRUE, lwd = 3, col = 6, contour.method = NA)
+diagram(s, levels = 10^(-3:3), add = TRUE)
+diagram(s, levels = 35, add = TRUE, lwd = 3, col = 6, contour.method = NA)
title(bquote(bold(.(expr.species("SO4-2"))~"(ppm)")))
```
</div>
More information about the CHNOSZ-commits
mailing list