as.png.plotmath: Convert Plotmath to PNG

View source: R/preview.R

as.png.plotmathR Documentation

Convert Plotmath to PNG

Description

Converts plotmath to png.

Usage

## S3 method for class 'plotmath'
as.png(
  x,
  filename = tempfile(),
  width = 3,
  height = 1,
  units = "in",
  res = 150,
  ...
)

Arguments

x

plotmath; see as_plotmath

filename

path for image file

width

width

height

height

units

units

res

resolution

...

passed arguments

Value

invisible filepath

See Also

Other preview: as.png.spork(), as_preview.latex(), as_preview.plotmath(), as_previews.spork(), as_previews(), as_preview(), ggplot.plotmath(), ggplot.spork()

Other png: as.png.spork()

Other plotmath: [.plotmath(), [[.plotmath(), as.expression.plotmath(), as_plotmath.spar(), as_plotmath.spork(), as_plotmath(), concatenate.plotmath(), ggplot.plotmath(), goodToken(), plotmathToken()

Examples

library(magrittr)
library(latexpdf)
'one joule (Omega) ~ 1 kg*m^2./s^2' %>% as_spork %>% as_plotmath %>% as.png -> file
file

spork documentation built on Sept. 16, 2023, 9:06 a.m.

Related to as.png.plotmath in spork...