EVOLUTION-MANAGER
Edit File: breaks_width.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: Equally spaced breaks</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 breaks_width {scales}"><tr><td>breaks_width {scales}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Equally spaced breaks</h2> <h3>Description</h3> <p>Useful for numeric, date, and date-time scales. </p> <h3>Usage</h3> <pre> breaks_width(width, offset = 0) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>width</code></td> <td> <p>Distance between each break. Either a number, or for date/times, a single string of the form "n unit", e.g. "1 month", "5 days". Unit can be of one "sec", "min", "hour", "day", "week", "month", "year".</p> </td></tr> <tr valign="top"><td><code>offset</code></td> <td> <p>Use if you don't want breaks to start at zero</p> </td></tr> </table> <h3>Examples</h3> <pre> demo_continuous(c(0, 100)) demo_continuous(c(0, 100), breaks = breaks_width(10)) demo_continuous(c(0, 100), breaks = breaks_width(20, -4)) demo_continuous(c(0, 100), breaks = breaks_width(20, 4)) # This is also useful for dates one_month <- as.POSIXct(c("2020-05-01", "2020-06-01")) demo_datetime(one_month) demo_datetime(one_month, breaks = breaks_width("1 week")) demo_datetime(one_month, breaks = breaks_width("5 days")) # This is so useful that scale_x_datetime() has a shorthand: demo_datetime(one_month, date_breaks = "5 days") # hms times also work one_hour <- hms::hms(hours = 0:1) demo_time(one_hour) demo_time(one_hour, breaks = breaks_width("15 min")) demo_time(one_hour, breaks = breaks_width("600 sec")) </pre> <hr /><div style="text-align: center;">[Package <em>scales</em> version 1.1.1 <a href="00Index.html">Index</a>]</div> </body></html>