[CHNOSZ-commits] r830 - in pkg/CHNOSZ: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Mar 2 03:59:08 CET 2024
Author: jedick
Date: 2024-03-02 03:59:08 +0100 (Sat, 02 Mar 2024)
New Revision: 830
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/NAMESPACE
pkg/CHNOSZ/R/stack_mosaic.R
pkg/CHNOSZ/R/util.plot.R
pkg/CHNOSZ/README.md
pkg/CHNOSZ/inst/NEWS.Rd
pkg/CHNOSZ/man/stack_mosaic.Rd
pkg/CHNOSZ/man/util.plot.Rd
Log:
Remove add.alpha()
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/DESCRIPTION 2024-03-02 02:59:08 UTC (rev 830)
@@ -1,6 +1,6 @@
-Date: 2024-02-28
+Date: 2024-03-02
Package: CHNOSZ
-Version: 2.1.0-2
+Version: 2.1.0-3
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/NAMESPACE
===================================================================
--- pkg/CHNOSZ/NAMESPACE 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/NAMESPACE 2024-03-02 02:59:08 UTC (rev 830)
@@ -60,7 +60,7 @@
# added 20220416
"rank.affinity",
# added 20220620
- "stack_mosaic", "add.alpha"
+ "stack_mosaic"
)
# Load shared objects
@@ -70,7 +70,7 @@
# Imports from default packages
importFrom("grDevices", "dev.cur", "dev.off", "extendrange",
"heat.colors", "png", "rainbow", "topo.colors", "dev.list",
- "contourLines", "col2rgb", "rgb")
+ "contourLines", "col2rgb", "rgb", "adjustcolor")
importFrom("graphics", "abline", "axTicks", "axis", "barplot", "box",
"contour", "image", "legend", "lines", "mtext", "par", "plot",
"plot.new", "plot.window", "points", "rect", "text", "title")
Modified: pkg/CHNOSZ/R/stack_mosaic.R
===================================================================
--- pkg/CHNOSZ/R/stack_mosaic.R 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/R/stack_mosaic.R 2024-03-02 02:59:08 UTC (rev 830)
@@ -10,7 +10,7 @@
loga_aq = NULL, 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"))
+ if(is.null(fill)) fill <- list(NA, NA, adjustcolor(col.names[3], alpha.f = 0.312))
# Load species1 (first metal-bearing species)
isp1 <- species(species1)
Modified: pkg/CHNOSZ/R/util.plot.R
===================================================================
--- pkg/CHNOSZ/R/util.plot.R 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/R/util.plot.R 2024-03-02 02:59:08 UTC (rev 830)
@@ -296,11 +296,3 @@
if(!is.null(lab)) mtext(lab, side = thisside, line = line, cex = cex, las = las)
}
}
-
-# Function to add transparency to given color 20220223
-add.alpha <- function(col, alpha) {
- x <- col2rgb(col)
- newcol <- rgb(x[1], x[2], x[3], maxColorValue = 255)
- newcol <- paste0(newcol, alpha)
- newcol
-}
Modified: pkg/CHNOSZ/README.md
===================================================================
--- pkg/CHNOSZ/README.md 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/README.md 2024-03-02 02:59:08 UTC (rev 830)
@@ -3,3 +3,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7765500.svg)](https://doi.org/10.5281/zenodo.7765500)
[![R-CMD-check](https://github.com/jedick/CHNOSZ/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jedick/CHNOSZ/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
+
+This is a mirror of the [primary repository on R-Forge](https://r-forge.r-project.org/projects/chnosz/).
+
+Please see the [CHNOSZ website](https://chnosz.net) for more information.
Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/inst/NEWS.Rd 2024-03-02 02:59:08 UTC (rev 830)
@@ -15,11 +15,17 @@
\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-2 (2024-02-28)}{
+\section{Changes in CHNOSZ version 2.1.0-3 (2024-03-02)}{
\itemize{
+
\item Move \code{read.fasta()}, \code{count.aa()}, and \code{aasum()} to canprot package.
+
\item Remove \code{seq2aa()}.
+
+ \item Remove \code{add.alpha()}. Now \code{grDevices::adjustcolor()} is
+ used in \code{stack_mosaic()} to add transparency.
+
}
}
Modified: pkg/CHNOSZ/man/stack_mosaic.Rd
===================================================================
--- pkg/CHNOSZ/man/stack_mosaic.Rd 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/man/stack_mosaic.Rd 2024-03-02 02:59:08 UTC (rev 830)
@@ -47,8 +47,7 @@
The plot parameters \code{col}, \code{col.names}, \code{fill}, \code{dx}, \code{dy}, \code{srt}, \code{lwd}, and \code{lty} should be length-3 lists (not vectors).
The values of elements 1--3 of the list are recycled to the number of species in \code{species1}, \code{species2}, and \code{species12}, respectively.
-For \code{fill}, the default is to use no fill except for \code{species12}, where the fill color is taken from \code{col.names} with added transparency.
-The default definition of \code{fill} is \code{list(NA, NA, add.alpha(col.names[3], "50"))}.
+For \code{fill}, the default is to use no fill except for \code{species12}, where the fill color is taken from \code{col.names} with added transparency added using \code{\link{adjustcolor}}.
}
\section{Warning}{
Modified: pkg/CHNOSZ/man/util.plot.Rd
===================================================================
--- pkg/CHNOSZ/man/util.plot.Rd 2024-02-28 03:06:28 UTC (rev 829)
+++ pkg/CHNOSZ/man/util.plot.Rd 2024-03-02 02:59:08 UTC (rev 830)
@@ -9,7 +9,6 @@
\alias{water.lines}
\alias{mtitle}
\alias{ZC.col}
-\alias{add.alpha}
\title{Functions to Create and Modify Plots}
\description{
@@ -34,7 +33,6 @@
lty = 2, lwd = 1, col = par("fg"), plot.it = TRUE)
mtitle(main, line = 0, spacing = 1, ...)
ZC.col(z)
- add.alpha(col, alpha)
}
\arguments{
@@ -72,7 +70,6 @@
\item{main}{character, text for plot title}
\item{spacing}{numeric, spacing between multiple lines}
\item{z}{numeric, set of values}
- \item{alpha}{character, hexadecimal value of color transparency (alpha)}
}
\details{
@@ -107,8 +104,6 @@
\code{ZC.col} uses \CRANpkg{colorspace}) to generate colors from a diverging palette (red - light grey - blue) corresponding to the values in \code{z}.
Red is associated with lower values of \code{z}.
This function is intended to generate colors for distinguishing average oxidation state of carbon \code{\link{ZC}}, but any numeric values can be supplied.
-
-\code{add.alpha} adds transparency to a color by appending the value of \code{alpha} to the hexadecimal representation of the color given in \code{col}.
}
\seealso{
More information about the CHNOSZ-commits
mailing list