Description Usage Arguments Value Examples
Function to calculate axis limits for plots displaying large amounts of data with large spread. This function optimises the xlim and ylim parameters of the final plot in order to include at least a certain percentage of the data points, while minimising the extent of the x and y axes.
1 2 3 4 5 6 7 8 9 | percdata_lim(
x,
y,
perc,
xlo.start = NULL,
xhi.start = NULL,
ylo.start = NULL,
yhi.start = NULL
)
|
x |
X values |
y |
Y values |
perc |
The percentage of points which should be included in the final figure |
xlo.start |
Specify the starting parameter for xlo |
xhi.start |
Specify the starting parameter for xhi |
ylo.start |
Specify the starting parameter for ylo |
yhi.start |
Specify the starting parameter for yhi |
Returns the x limits and the y limits for the new plot
1 2 3 4 | x <- rnorm(1000)
y <- rnorm(1000)
percdata_lim(x,y,90)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.