EVOLUTION-MANAGER
Edit File: qplot.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: Quick plot</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 qplot {ggplot2}"><tr><td>qplot {ggplot2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Quick plot</h2> <h3>Description</h3> <p><code>qplot()</code> is a shortcut designed to be familiar if you're used to base <code><a href="../../graphics/html/plot.html">plot()</a></code>. It's a convenient wrapper for creating a number of different types of plots using a consistent calling scheme. It's great for allowing you to produce plots quickly, but I highly recommend learning <code><a href="ggplot.html">ggplot()</a></code> as it makes it easier to create complex graphics. </p> <h3>Usage</h3> <pre> qplot( x, y, ..., data, facets = NULL, margins = FALSE, geom = "auto", xlim = c(NA, NA), ylim = c(NA, NA), log = "", main = NULL, xlab = NULL, ylab = NULL, asp = NA, stat = NULL, position = NULL ) quickplot( x, y, ..., data, facets = NULL, margins = FALSE, geom = "auto", xlim = c(NA, NA), ylim = c(NA, NA), log = "", main = NULL, xlab = NULL, ylab = NULL, asp = NA, stat = NULL, position = NULL ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y, ...</code></td> <td> <p>Aesthetics passed into each layer</p> </td></tr> <tr valign="top"><td><code>data</code></td> <td> <p>Data frame to use (optional). If not specified, will create one, extracting vectors from the current environment.</p> </td></tr> <tr valign="top"><td><code>facets</code></td> <td> <p>faceting formula to use. Picks <code><a href="facet_wrap.html">facet_wrap()</a></code> or <code><a href="facet_grid.html">facet_grid()</a></code> depending on whether the formula is one- or two-sided</p> </td></tr> <tr valign="top"><td><code>margins</code></td> <td> <p>See <code>facet_grid</code>: display marginal facets?</p> </td></tr> <tr valign="top"><td><code>geom</code></td> <td> <p>Character vector specifying geom(s) to draw. Defaults to "point" if x and y are specified, and "histogram" if only x is specified.</p> </td></tr> <tr valign="top"><td><code>xlim, ylim</code></td> <td> <p>X and y axis limits</p> </td></tr> <tr valign="top"><td><code>log</code></td> <td> <p>Which variables to log transform ("x", "y", or "xy")</p> </td></tr> <tr valign="top"><td><code>main, xlab, ylab</code></td> <td> <p>Character vector (or expression) giving plot title, x axis label, and y axis label respectively.</p> </td></tr> <tr valign="top"><td><code>asp</code></td> <td> <p>The y/x aspect ratio</p> </td></tr> <tr valign="top"><td><code>stat, position</code></td> <td> <p>DEPRECATED.</p> </td></tr> </table> <h3>Examples</h3> <pre> # Use data from data.frame qplot(mpg, wt, data = mtcars) qplot(mpg, wt, data = mtcars, colour = cyl) qplot(mpg, wt, data = mtcars, size = cyl) qplot(mpg, wt, data = mtcars, facets = vs ~ am) qplot(1:10, rnorm(10), colour = runif(10)) qplot(1:10, letters[1:10]) mod <- lm(mpg ~ wt, data = mtcars) qplot(resid(mod), fitted(mod)) f <- function() { a <- 1:10 b <- a ^ 2 qplot(a, b) } f() # To set aesthetics, wrap in I() qplot(mpg, wt, data = mtcars, colour = I("red")) # qplot will attempt to guess what geom you want depending on the input # both x and y supplied = scatterplot qplot(mpg, wt, data = mtcars) # just x supplied = histogram qplot(mpg, data = mtcars) # just y supplied = scatterplot, with x = seq_along(y) qplot(y = mpg, data = mtcars) # Use different geoms qplot(mpg, wt, data = mtcars, geom = "path") qplot(factor(cyl), wt, data = mtcars, geom = c("boxplot", "jitter")) qplot(mpg, data = mtcars, geom = "dotplot") </pre> <hr /><div style="text-align: center;">[Package <em>ggplot2</em> version 3.3.2 <a href="00Index.html">Index</a>]</div> </body></html>