Here is the help document on xaxs and yaxs in R.
xaxs
The style of axis interval calculation to be used for the x-axis. Possible values are "r", "i", "e", "s", "d". The styles are generally controlled by the range of data or xlim, if given. Style "r" (regular) first extends the data range by 4 percent at each end and then finds an axis with pretty labels that fits within the extended range. Style "i" (internal) just finds an axis with pretty labels that fits within the original data range. Style "s" (standard) finds an axis with pretty labels within which the original data range fits. Style "e" (extended) is like style "s", except that it is also ensures that there is room for plotting symbols within the bounding box. Style "d" (direct) specifies that the current axis should be used on subsequent plots. (Only "r" and "i" styles are currently implemented)
> x <- rnorm(100)
> y <- rnorm(x)
> plot(x, y, xlim = c(-2, 2), ylim = c(-2, 2))
> plot(x, y, xlim = c(-2, 2), ylim = c(-2, 2), xaxs = "i", yaxs = "i")
No comments:
Post a Comment