EVOLUTION-MANAGER
Edit File: cbreaks.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: Compute breaks for continuous scale</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 cbreaks {scales}"><tr><td>cbreaks {scales}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compute breaks for continuous scale</h2> <h3>Description</h3> <a href='https://www.tidyverse.org/lifecycle/#retired'><img src='figures/lifecycle-retired.svg' alt='Retired lifecycle'></a> <p>This function wraps up the components needed to go from a continuous range to a set of breaks and labels suitable for display on axes or legends. </p> <h3>Usage</h3> <pre> cbreaks(range, breaks = extended_breaks(), labels = scientific_format()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>range</code></td> <td> <p>numeric vector of length 2 giving the range of the underlying data</p> </td></tr> <tr valign="top"><td><code>breaks</code></td> <td> <p>either a vector of break values, or a break function that will make a vector of breaks when given the range of the data</p> </td></tr> <tr valign="top"><td><code>labels</code></td> <td> <p>either a vector of labels (character vector or list of expression) or a format function that will make a vector of labels when called with a vector of breaks. Labels can only be specified manually if breaks are - it is extremely dangerous to supply labels if you don't know what the breaks will be.</p> </td></tr> </table> <h3>Examples</h3> <pre> cbreaks(c(0, 100)) cbreaks(c(0, 100), breaks_pretty(3)) cbreaks(c(0, 100), breaks_pretty(10)) cbreaks(c(1, 100), log_breaks()) cbreaks(c(1, 1e4), log_breaks()) cbreaks(c(0, 100), labels = math_format()) cbreaks(c(0, 1), labels = percent_format()) cbreaks(c(0, 1e6), labels = comma_format()) cbreaks(c(0, 1e6), labels = dollar_format()) cbreaks(c(0, 30), labels = dollar_format()) # You can also specify them manually: cbreaks(c(0, 100), breaks = c(15, 20, 80)) cbreaks(c(0, 100), breaks = c(15, 20, 80), labels = c(1.5, 2.0, 8.0)) cbreaks(c(0, 100), breaks = c(15, 20, 80), labels = expression(alpha, beta, gamma)) </pre> <hr /><div style="text-align: center;">[Package <em>scales</em> version 1.1.1 <a href="00Index.html">Index</a>]</div> </body></html>