isopleuros

Ternary Plots - :exclamation: This is a read-only mirror from https://codeberg.org/tesselle/isopleuros

https://github.com/tesselle/isopleuros

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.9%) to scientific vocabulary

Keywords

archaeological-science archaeometry data-visualization r-package ternary-plots
Last synced: 4 months ago · JSON representation ·

Repository

Ternary Plots - :exclamation: This is a read-only mirror from https://codeberg.org/tesselle/isopleuros

Basic Info
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 4
Topics
archaeological-science archaeometry data-visualization r-package ternary-plots
Created about 3 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog License Citation Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = NULL
)
Sys.setenv(LANGUAGE = "en") # Force locale
```

# isopleuros 


[![status-badge](https://ci.codeberg.org/api/badges/14691/status.svg)](https://ci.codeberg.org/repos/14691){.pkgdown-devel}
[![Code coverage](https://packages.tesselle.org/isopleuros/coverage/badge.svg)](https://packages.tesselle.org/isopleuros/coverage/){.pkgdown-devel}
[![Dependencies](https://tinyverse.netlify.app/badge/isopleuros)](https://cran.r-project.org/package=isopleuros){.pkgdown-devel}

[![r-universe](https://tesselle.r-universe.dev/badges/isopleuros)](https://tesselle.r-universe.dev/isopleuros){.pkgdown-devel}
[![CRAN Version](https://www.r-pkg.org/badges/version/isopleuros)](https://cran.r-project.org/package=isopleuros){.pkgdown-release}
[![CRAN checks](https://badges.cranchecks.info/worst/isopleuros.svg)](https://cran.r-project.org/web/checks/check_results_isopleuros.html){.pkgdown-release}
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/isopleuros)](https://cran.r-project.org/package=isopleuros){.pkgdown-release}

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7940389.svg)](https://doi.org/10.5281/zenodo.7940389)


## Overview

Ternary plots made simple. **isopleuros** allows to create ternary plots using base **graphics**. It provides functions to display the data in the ternary space, to add or tune graphical elements and to display statistical summaries. It also includes common ternary diagrams useful for the archaeologist (e.g. soil texture charts, ceramic phase diagram).

**isopleuros** is a dependency-free package^[The only exception is the `ternary_contour()` function for which the [**interp**](https://cran.r-project.org/package=interp) package is required, but is not installed by default.] designed to be as simple as possible.

---

```{r citation, echo=FALSE, comment='', results='asis'}
cite <- utils::citation("isopleuros")
print(cite, bibtex = FALSE)
```

## Installation

You can install the released version of **isopleuros** from [CRAN](https://CRAN.R-project.org) with:

```{r cran-installation, eval=FALSE}
install.packages("isopleuros")
```

And the development version from [Codeberg](https://codeberg.org/) with:

```{r gh-installation, eval=FALSE}
# install.packages("remotes")
remotes::install_git("https://codeberg.org/tesselle/isopleuros")
```

## Usage

```{r packages-load}
## Load package
library(isopleuros)
```

```{r ternary, fig.width=7, fig.height=3.5, fig.align='center'}
## Graphical parameters
par(mfrow = c(1, 2), mar = c(0, 0, 0, 0) + 0.1)

## Set colors
col <- c("blue", "red")

## Ternary plot
## (data from Aitchison 1986)
ternary_plot(
  x = lava, 
  panel.first = ternary_grid(),
  col = col[as.factor(lava$A > 30)],
)

## Split data
groups <- split(lava, f = lava$A > 30)

## Add tolerance ellipses
for (i in seq_along(groups)) {
  ternary_tolerance(groups[[i]], level = 0.975, lty = 2, border = col[[i]])
}

## Density contours
ternary_plot(lava, panel.first = ternary_grid())
ternary_density(lava, n = 500, nlevels = 10)
```

```{r pairs, fig.width=7, fig.height=7, fig.align='center'}
## Install extra package (if needed)
# install.packages("folio")

## Data from Barrera and Velde 1989
data("verre", package = "folio")

## Select data
coda <- verre[, c("Na2O", "CaO", "K2O", "MgO", "P2O5", "Al2O3")]

## Ternary plots with marginal compositions
ternary_pairs(coda, col = as.factor(coda$Na2O > 5))
```

```{r charts, fig.width=7, fig.height=7, fig.align='center'}
## Graphical parameters
par(mfrow = c(2, 2), mar = c(0, 0, 0, 0) + 0.1)

## Ceramic phase diagram
ternary_plot(NULL, axes = FALSE, ann = FALSE, frame.plot = TRUE)
triangle_phase_cas(symbol = TRUE, pch = 16)

ternary_plot(NULL, xlab = "CaO", ylab = "Al2O3", zlab = "SiO2")
triangle_phase_ceramic(symbol = TRUE, pch = 16)

## HYPRES soil texture
ternary_plot(NULL, xlab = "sand", ylab = "silt", zlab = "clay")
triangle_soil_hypres()

## USDA (1951) soil texture
ternary_plot(NULL, xlab = "sand", ylab = "silt", zlab = "clay")
triangle_soil_usda(symbol = TRUE)
```

## Translation

This package provides translations of user-facing communications, like messages, warnings and errors. The preferred language is by default taken from the locale. This can be overridden by setting of the environment variable `LANGUAGE` (you only need to do this once per session):

``` r
Sys.setenv(LANGUAGE = "")
```

Languages currently available are English (`en`) and French (`fr`).

## Related Works

* [**Ternary**](https://cran.r-project.org/package=Ternary) allows to create ternary and Holdridge plots using **graphics**.
* [**ggtern**](https://cran.r-project.org/package=ggtern) extends the functionality of **ggplot2** to plot ternary diagrams.

## Contributing

Please note that the **isopleuros** project is released with a [Contributor Code of Conduct](https://www.tesselle.org/conduct.html). By contributing to this project, you agree to abide by its terms.

```{r metadata, include=FALSE}
## Update codemeta.json
codemetar::write_codemeta(verbose = FALSE)

## Update CITATION.cff
cff_keys <- list(
  identifiers = list(
    list(description = "The concept DOI.",
         type = "doi",
         value = "10.5281/zenodo.7940389"),
    list(description = "The versioned DOI for version 1.0.0.",
         type = "doi",
         value = "10.5281/zenodo.7940390"),
    list(description = "The versioned DOI for version 1.1.0.",
         type = "doi",
         value = "10.5281/zenodo.10357139"),
    list(description = "The versioned DOI for version 1.2.0.",
         type = "doi",
         value = "10.5281/zenodo.10469854"),
    list(description = "The versioned DOI for version 1.3.0.",
         type = "doi",
         value = "10.5281/zenodo.14204958"),
    list(description = "The versioned DOI for version 1.4.0.",
         type = "doi",
         value = "10.5281/zenodo.14967833"),
    list(description = "The CRAN DOI",
         type = "doi",
         value = "10.32614/cran.package.isopleuros")
  )
)
cff <- cffr::cff_create("DESCRIPTION", keys = cff_keys)
if (cffr::cff_validate(cff)) cffr::cff_write(cff, outfile = "CITATION.cff")
```

Owner

  • Name: tesselle
  • Login: tesselle
  • Kind: organization
  • Location: France

A collection of R packages for archaeological research and teaching

Citation (CITATION.cff)

# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "isopleuros" in publications use:'
type: software
license: GPL-3.0-or-later
title: 'isopleuros: Ternary Plots'
version: 1.4.0
doi: 10.5281/zenodo.7940389
identifiers:
- description: The concept DOI.
  type: doi
  value: 10.5281/zenodo.7940389
- description: The versioned DOI for version 1.0.0.
  type: doi
  value: 10.5281/zenodo.7940390
- description: The versioned DOI for version 1.1.0.
  type: doi
  value: 10.5281/zenodo.10357139
- description: The versioned DOI for version 1.2.0.
  type: doi
  value: 10.5281/zenodo.10469854
- description: The versioned DOI for version 1.3.0.
  type: doi
  value: 10.5281/zenodo.14204958
- description: The versioned DOI for version 1.4.0.
  type: doi
  value: 10.5281/zenodo.14967833
- description: The CRAN DOI
  type: doi
  value: 10.32614/cran.package.isopleuros
abstract: Ternary plots made simple. This package allows to create ternary plots using
  'graphics'. It provides functions to display the data in the ternary space, to add
  or tune graphical elements and to display statistical summaries. It also includes
  common ternary diagrams which are useful for the archaeologist (e.g. soil texture
  charts, ceramic phase diagram).
authors:
- family-names: Frerebeau
  given-names: Nicolas
  email: nicolas.frerebeau@u-bordeaux-montaigne.fr
  orcid: https://orcid.org/0000-0001-5759-4944
preferred-citation:
  type: manual
  title: 'isopleuros: Ternary Plots'
  authors:
  - family-names: Frerebeau
    given-names: Nicolas
    email: nicolas.frerebeau@u-bordeaux-montaigne.fr
    orcid: https://orcid.org/0000-0001-5759-4944
  year: '2025'
  institution:
    name: Université Bordeaux Montaigne
    address: Pessac, France
  notes: R package version 1.4.0
  url: https://packages.tesselle.org/isopleuros/
  doi: 10.5281/zenodo.7940389
repository: https://CRAN.R-project.org/package=isopleuros
repository-code: https://codeberg.org/tesselle/isopleuros
url: https://packages.tesselle.org/isopleuros/
contact:
- family-names: Frerebeau
  given-names: Nicolas
  email: nicolas.frerebeau@u-bordeaux-montaigne.fr
  orcid: https://orcid.org/0000-0001-5759-4944
keywords:
- archaeometry
- archaeological-science
- ternary-plot
- data-visualization
- r-package
references:
- type: software
  title: 'R: A Language and Environment for Statistical Computing'
  notes: Depends
  url: https://www.R-project.org/
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
  version: '>= 3.5'
- type: software
  title: graphics
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: grDevices
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: methods
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: stats
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: utils
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: interp
  abstract: 'interp: Interpolation Methods'
  notes: Suggests
  repository: https://CRAN.R-project.org/package=interp
  authors:
  - family-names: Gebhardt
    given-names: Albrecht
    email: albrecht.gebhardt@aau.at
  - family-names: Bivand
    given-names: Roger
    email: Roger.Bivand@nhh.no
  - family-names: Sinclair
    given-names: David
    email: david@s-hull.org
  year: '2025'
  doi: 10.32614/CRAN.package.interp
- type: software
  title: rsvg
  abstract: 'rsvg: Render SVG Images into PDF, PNG, (Encapsulated) PostScript, or
    Bitmap Arrays'
  notes: Suggests
  url: https://docs.ropensci.org/rsvg/
  repository: https://CRAN.R-project.org/package=rsvg
  authors:
  - family-names: Ooms
    given-names: Jeroen
    email: jeroenooms@gmail.com
    orcid: https://orcid.org/0000-0002-4035-0289
  year: '2025'
  doi: 10.32614/CRAN.package.rsvg
- type: software
  title: svglite
  abstract: 'svglite: An ''SVG'' Graphics Device'
  notes: Suggests
  url: https://svglite.r-lib.org
  repository: https://CRAN.R-project.org/package=svglite
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  - family-names: Henry
    given-names: Lionel
    email: lionel@posit.co
  - family-names: Pedersen
    given-names: Thomas Lin
    email: thomas.pedersen@posit.co
    orcid: https://orcid.org/0000-0002-5147-4711
  - family-names: Luciani
    given-names: T Jake
    email: jake@apache.org
  - family-names: Decorde
    given-names: Matthieu
    email: matthieu.decorde@ens-lyon.fr
  - family-names: Lise
    given-names: Vaudor
    email: lise.vaudor@ens-lyon.fr
  year: '2025'
  doi: 10.32614/CRAN.package.svglite
- type: software
  title: tinysnapshot
  abstract: 'tinysnapshot: Snapshots for Unit Tests using the ''tinytest'' Framework'
  notes: Suggests
  url: https://github.com/vincentarelbundock/tinysnapshot
  repository: https://CRAN.R-project.org/package=tinysnapshot
  authors:
  - family-names: Arel-Bundock
    given-names: Vincent
    email: vincent.arel-bundock@umontreal.ca
    orcid: https://orcid.org/0000-0003-2042-7063
  year: '2025'
  doi: 10.32614/CRAN.package.tinysnapshot
- type: software
  title: tinytest
  abstract: 'tinytest: Lightweight and Feature Complete Unit Testing Framework'
  notes: Suggests
  url: https://github.com/markvanderloo/tinytest
  repository: https://CRAN.R-project.org/package=tinytest
  authors:
  - family-names: Loo
    given-names: Mark
    name-particle: van der
    email: mark.vanderloo@gmail.com
    orcid: https://orcid.org/0000-0002-9807-4686
  year: '2025'
  doi: 10.32614/CRAN.package.tinytest

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "isopleuros",
  "description": "Ternary plots made simple. This package allows to create ternary plots using 'graphics'. It provides functions to display the data in the ternary space, to add or tune graphical elements and to display statistical summaries. It also includes common ternary diagrams which are useful for the archaeologist (e.g. soil texture charts, ceramic phase diagram).",
  "name": "isopleuros: Ternary Plots",
  "relatedLink": [
    "https://packages.tesselle.org/isopleuros/",
    "https://CRAN.R-project.org/package=isopleuros"
  ],
  "codeRepository": "https://codeberg.org/tesselle/isopleuros",
  "issueTracker": "https://codeberg.org/tesselle/isopleuros/issues",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "1.4.0",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.4.2 (2024-10-31)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Nicolas",
      "familyName": "Frerebeau",
      "email": "nicolas.frerebeau@u-bordeaux-montaigne.fr",
      "@id": "https://orcid.org/0000-0001-5759-4944"
    }
  ],
  "funder": [
    {
      "@type": "Organization",
      "name": "Universit Bordeaux Montaigne"
    },
    {
      "@type": "Organization",
      "name": "CNRS"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Nicolas",
      "familyName": "Frerebeau",
      "email": "nicolas.frerebeau@u-bordeaux-montaigne.fr",
      "@id": "https://orcid.org/0000-0001-5759-4944"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "interp",
      "name": "interp",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=interp"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rsvg",
      "name": "rsvg",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rsvg"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "svglite",
      "name": "svglite",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=svglite"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tinysnapshot",
      "name": "tinysnapshot",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tinysnapshot"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tinytest",
      "name": "tinytest",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tinytest"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 3.5"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "graphics",
      "name": "graphics"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "grDevices",
      "name": "grDevices"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "methods",
      "name": "methods"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "stats",
      "name": "stats"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    "SystemRequirements": null
  },
  "applicationCategory": "ArchaeologicalScience",
  "isPartOf": "https://www.tesselle.org",
  "keywords": [
    "archaeometry",
    "archaeological-science",
    "ternary-plot",
    "data-visualization",
    "r-package"
  ],
  "fileSize": "1248.078KB",
  "citation": [
    {
      "@type": "SoftwareSourceCode",
      "datePublished": "2025",
      "author": [
        {
          "@type": "Person",
          "givenName": "Nicolas",
          "familyName": "Frerebeau"
        }
      ],
      "name": "{isopleuros: Ternary Plots}",
      "identifier": "10.5281/zenodo.7940389",
      "url": "https://packages.tesselle.org/isopleuros/",
      "description": "R package version 1.4.0",
      "@id": "https://doi.org/10.5281/zenodo.7940389",
      "sameAs": "https://doi.org/10.5281/zenodo.7940389"
    }
  ],
  "developmentStatus": "https://www.repostatus.org/#active"
}

GitHub Events

Total
  • Release event: 2
  • Push event: 17
  • Create event: 3
Last Year
  • Release event: 2
  • Push event: 17
  • Create event: 3

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • grDevices * imports
  • graphics * imports
  • methods * imports
  • utils * imports
  • akima * suggests
  • testthat >= 3.0.0 suggests
  • vdiffr >= 1.0.0 suggests