Description Usage Arguments Details Author(s) See Also Examples

View source: R/define.plot.area.R

Function that determines the size of a scatterplot, taking into consideration additional margin to fit longer labels appearing on a graph (if applicable), optional margin defined by user, and some space to offset scatterplot labels from points (if applicable).

1 | ```
define.plot.area(x.coord, y.coord, xymargins = 2, v.offset = 0)
``` |

`x.coord` |
a vector of x coordinates, optionally with names. |

`y.coord` |
a vector of y coordinates. |

`xymargins` |
additional margins (expressed as a % of the actual plot area). |

`v.offset` |
label offset (expressed as a % of the actual plot area). |

Function that finds out the coordinates of scatterplots: it computes the extreme x and y values, adds margins, and optionally extends the top margin if a plot uses sample labels. Automatic margin extension will only take place if the x coordinates are supplemented by their names (i.e. labels of points to be shown on scatterplot).

Maciej Eder

1 2 3 4 5 6 7 8 | ```
# to determine the plotting area for 4 points:
define.plot.area( c(1,2,3,4), c(-0.001,0.11,-0.023,0.09))
# to determine plot coordinates, taking into consideration
# the objects' names
my.points = cbind(c(1,2,3,4),c(-0.001,0.11,-0.023,0.09))
rownames(my.points) = c("first","second","third","very_long_fourth")
define.plot.area(my.points[,1], my.points[,2])
``` |

```
### stylo version: 0.6.9 ###
If you plan to cite this software (please do!), use the following reference:
Eder, M., Rybicki, J. and Kestemont, M. (2016). Stylometry with R:
a package for computational text analysis. R Journal 8(1): 107-121.
<https://journal.r-project.org/archive/2016/RJ-2016-007/index.html>
To get full BibTeX entry, type: citation("stylo")
Warning message:
no DISPLAY variable so Tk is not available
[[1]]
[1] 0.94 4.06
[[2]]
[1] -0.02566 0.11266
[[1]]
[1] 0.865 4.300
[[2]]
[1] -0.02566 0.11266
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.