EVOLUTION-MANAGER
Edit File: plotPNG.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Run a plotting function and save the output as a PNG</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for plotPNG {shiny}"><tr><td>plotPNG {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Run a plotting function and save the output as a PNG</h2> <h3>Description</h3> <p>This function returns the name of the PNG file that it generates. In essence, it calls <code>png()</code>, then <code>func()</code>, then <code>dev.off()</code>. So <code>func</code> must be a function that will generate a plot when used this way. </p> <h3>Usage</h3> <pre> plotPNG( func, filename = tempfile(fileext = ".png"), width = 400, height = 400, res = 72, ... ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>func</code></td> <td> <p>A function that generates a plot.</p> </td></tr> <tr valign="top"><td><code>filename</code></td> <td> <p>The name of the output file. Defaults to a temp file with extension <code>.png</code>.</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>Width in pixels.</p> </td></tr> <tr valign="top"><td><code>height</code></td> <td> <p>Height in pixels.</p> </td></tr> <tr valign="top"><td><code>res</code></td> <td> <p>Resolution in pixels per inch. This value is passed to <code><a href="../../grDevices/html/png.html">grDevices::png()</a></code>. Note that this affects the resolution of PNG rendering in R; it won't change the actual ppi of the browser.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Arguments to be passed through to <code><a href="../../grDevices/html/png.html">grDevices::png()</a></code>. These can be used to set the width, height, background color, etc.</p> </td></tr> </table> <h3>Details</h3> <p>For output, it will try to use the following devices, in this order: quartz (via <code><a href="../../grDevices/html/png.html">grDevices::png()</a></code>), then <code><a href="../../Cairo/html/Cairo.html">Cairo::CairoPNG()</a></code>, and finally <code><a href="../../grDevices/html/png.html">grDevices::png()</a></code>. This is in order of quality of output. Notably, plain <code>png</code> output on Linux and Windows may not antialias some point shapes, resulting in poor quality output. </p> <p>In some cases, <code>Cairo()</code> provides output that looks worse than <code>png()</code>. To disable Cairo output for an app, use <code>options(shiny.usecairo=FALSE)</code>. </p> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>