order_points | R Documentation |
Re-order a data frame to control the plotting order of points in ggplot. This is designed to control over-plotting of points by sorting the data frame based on input arguments. It is used in plots by symbol and color, where overplotting may affect readability.
order_points(x, method)
x |
data frame containing data to re-order |
method |
character string, specifying how to order the rows. Currently accepted values are "random", which randomizes the order, and "input", which returns the input data frame as-is. |
a data frame with same contents as x
, with rows re-ordered according to method
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.