place_text: Place annotations to a specified position

Description Usage Arguments Value See Also

View source: R/place_text.R

Description

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.

Usage

1
place_text(x, y, x_prop = 0.1, y_prop = 0.1, pos)

Arguments

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.

Value

The function returns a vector with the x and y coordinates depending on the selected position.

See Also

plot_trend, plot_model


saskiaotto/INDperform documentation built on Oct. 27, 2021, 10:33 p.m.