place_text
is a helper function for plot_trend
and plot_model
to generate the x and y coordinates
for placing annotations in the ggplot depending on the specified
position.
place_text(x, y, x_prop = 0.1, y_prop = 0.1, pos)
x | The complete vector of x values in the ggplot. |
---|---|
y | The complete vector of y values in the ggplot. |
pos | Specifies the corner in which to place the annotation. This must be one of "topleft", "topright", "bottomleft" and "bottomright"; default is "topleft". |
x_range | The required width of the text box. Numeric value between 0 and 1; default is 0.1. |
y_range | The required height of the text box. Numeric value between 0 and 1; default is 0.2. |
The function returns a vector with the x and y coordinates depending on the selected position.