EVOLUTION-MANAGER
Edit File: discrete_scale.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: Discrete scale constructor</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 discrete_scale {ggplot2}"><tr><td>discrete_scale {ggplot2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Discrete scale constructor</h2> <h3>Description</h3> <p>Discrete scale constructor </p> <h3>Usage</h3> <pre> discrete_scale( aesthetics, scale_name, palette, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, expand = waiver(), na.translate = TRUE, na.value = NA, drop = TRUE, guide = "legend", position = "left", super = ScaleDiscrete ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>aesthetics</code></td> <td> <p>The names of the aesthetics that this scale works with.</p> </td></tr> <tr valign="top"><td><code>scale_name</code></td> <td> <p>The name of the scale that should be used for error messages associated with this scale.</p> </td></tr> <tr valign="top"><td><code>palette</code></td> <td> <p>A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., <code><a href="../../scales/html/hue_pal.html">scales::hue_pal()</a></code>).</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>The name of the scale. Used as the axis or legend title. If <code>waiver()</code>, the default, the name of the scale is taken from the first mapping used for that aesthetic. If <code>NULL</code>, the legend title will be omitted.</p> </td></tr> <tr valign="top"><td><code>breaks</code></td> <td> <p>One of: </p> <ul> <li> <p><code>NULL</code> for no breaks </p> </li> <li> <p><code>waiver()</code> for the default breaks (the scale limits) </p> </li> <li><p> A character vector of breaks </p> </li> <li><p> A function that takes the limits as input and returns breaks as output </p> </li></ul> </td></tr> <tr valign="top"><td><code>labels</code></td> <td> <p>One of: </p> <ul> <li> <p><code>NULL</code> for no labels </p> </li> <li> <p><code>waiver()</code> for the default labels computed by the transformation object </p> </li> <li><p> A character vector giving labels (must be same length as <code>breaks</code>) </p> </li> <li><p> A function that takes the breaks as input and returns labels as output </p> </li></ul> </td></tr> <tr valign="top"><td><code>limits</code></td> <td> <p>One of: </p> <ul> <li> <p><code>NULL</code> to use the default scale values </p> </li> <li><p> A character vector that defines possible values of the scale and their order </p> </li> <li><p> A function that accepts the existing (automatic) values and returns new ones </p> </li></ul> </td></tr> <tr valign="top"><td><code>expand</code></td> <td> <p>For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function <code><a href="expansion.html">expansion()</a></code> to generate the values for the <code>expand</code> argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.</p> </td></tr> <tr valign="top"><td><code>na.translate</code></td> <td> <p>Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify <code>na.translate = FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>na.value</code></td> <td> <p>If <code>na.translate = TRUE</code>, what aesthetic value should the missing values be displayed as? Does not apply to position scales where <code>NA</code> is always placed at the far right.</p> </td></tr> <tr valign="top"><td><code>drop</code></td> <td> <p>Should unused factor levels be omitted from the scale? The default, <code>TRUE</code>, uses the levels that appear in the data; <code>FALSE</code> uses all the levels in the factor.</p> </td></tr> <tr valign="top"><td><code>guide</code></td> <td> <p>A function used to create a guide or its name. See <code><a href="guides.html">guides()</a></code> for more information.</p> </td></tr> <tr valign="top"><td><code>position</code></td> <td> <p>For position scales, The position of the axis. <code>left</code> or <code>right</code> for y axes, <code>top</code> or <code>bottom</code> for x axes.</p> </td></tr> <tr valign="top"><td><code>super</code></td> <td> <p>The super class to use for the constructed scale</p> </td></tr> </table> <hr /><div style="text-align: center;">[Package <em>ggplot2</em> version 3.3.2 <a href="00Index.html">Index</a>]</div> </body></html>