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.
data frame containing data to re-order
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.