plot_bandgaps: Plot band gaps

View source: R/baseplot.R

plot_bandgapsR Documentation

Plot band gaps

Description

Band energies and gaps of user-selectable semiconductors using R base graphics. There is no practical way to return a plot object using base graphics, so this function does not return anything, it just creates the plot. It is probably well-suited for use in a Rmd or LaTeX document. The generated plot requires the LaTeX packages siunitx and chemformula to typeset the text labels.

Usage

plot_bandgaps(materials, secondary.scale = "AVS", dev = FALSE)

Arguments

materials

a subset of semiconductors dataframe

secondary.scale

select reference electrode for the secondary y-axis Default secondary scale is AVS (vacuum scale). Set this argument to empty string to disable the secondary scale.

dev

used for testing during development. Setting to TRUE enables extra plot elements such as x-axis and grids to support development.

Examples

## Not run: 
plot_bandgaps(bandgaps::semiconductors %>%
   filter(class == "oxide") %>%
   filter(str_detect(formula, "Fe")),
   secondary.scale = "AVS")
plot_bandgaps(bandgaps::semiconductors %>%
   filter(class == "oxide") %>%
   filter(str_detect(formula, "O2")))

## End(Not run)

solarchemist/bandgaps documentation built on July 9, 2023, 3:59 a.m.