Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ps.end

Close PostScript or Acrobat Graphics Device opened by 'ps.do' / 'pdf.do'


Description

Closes the PostScript or PDF file (postscript,pdf), openend by a previous ps.do (or pdf.latex, or ...) call, using dev.off, and additionally opens a previewer for that file, unless the previewer is already up. This almost provides an ‘interactive’ device (like x11) for postscript or pdf.

Usage

ps.end(call.gv= NULL, command = getOption("eps_view"),
       debug = getOption("verbose"))
pdf.end(call.viewer= NULL, command = getOption("pdfviewer"),
       debug = getOption("verbose"))

Arguments

call.gv,call.viewer

logical, indicating if the postscript or acrobat reader (e.g., ghostview or acroread or the command given by command) should be called. By default, find out if the viewer is already runing on this file and only call it if needed.

command

character, giving a system command for PostScript previewing. By default, getOption("eps_view") is set to
gv -watch -geometry -0+0 -magstep -2 -media BBox -noantialias which assumes gv (aka ghostview) to be in your OS path.

debug

logical; if TRUE print information during execution.

Details

Depends on Unix tools, such as ps.

Author(s)

Martin Maechler

See Also

Examples

if(interactive() 
  ) {
    myPS <- tempfile("ex", fileext = ".ps")
    ps.do(myPS)
    data(sunspots)
    plot(sunspots)
    ps.end()

    tempfile("ex-sun", fileext = ".pdf") -> myPDF
    pdf.latex(myPDF)
    plot(sunspots)
    pdf.end(call. = FALSE) # basically the same as dev.off()
  }
  ps.latex(tempfile("ex2", fileext = ".eps"))
  plot(sunspots)
  ps.end(call.gv = FALSE) # basically the same as dev.off()

sfsmisc

Utilities from 'Seminar fuer Statistik' ETH Zurich

v1.1-11
GPL (>= 2)
Authors
Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Werner Stahel [ctb] (Functions: compresid2way(), f.robftest(), last(), p.scales(), p.dnorm()), Andreas Ruckstuhl [ctb] (Functions: p.arrows(), p.profileTraces(), p.res.2x()), Christian Keller [ctb] (Functions: histBxp(), p.tachoPlot()), Kjetil Halvorsen [ctb] (Functions: KSd(), ecdf.ksCI()), Alain Hauser [ctb] (Functions: cairoSwd(), is.whole(), toLatex.numeric()*), Christoph Buser [ctb] (to function Duplicated()), Lorenz Gygax [ctb] (to function p.res.2fact()), Bill Venables [ctb] (Functions: empty.dimnames(), primes()), Tony Plate [ctb] (to inv.seq()), Isabelle Fl<fc>ckiger [ctb], Marcel Wolbers [ctb], Markus Keller [ctb], Sandrine Dudoit [ctb], Jane Fridlyand [ctb], Greg Snow [ctb] (to loessDemo()), Henrik Aa. Nielsen [ctb] (to loessDemo()), Vincent Carey [ctb], Ben Bolker [ctb], Philippe Grosjean [ctb], Fr<e9>d<e9>ric Ibanez [ctb], Caterina Savi [ctb], Charles Geyer [ctb], Jens Oehlschl<e4>gel [ctb]
Initial release
2021-04-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.