testCalloutsByView: Test Callouts by View

Description Usage Arguments Value

View source: R/utils-limits.R

Description

A function that calculates if a callout goes past an x-axis limit.

Usage

1
testCalloutsByView(plot_obj, view_num, xlimits_real, width_char, xrange)

Arguments

plot_obj

The overarching plot object that contains these objects.

view_num

The axis which the callouts are being compared to. Starts at the bottom x-axis as 1, and goes clockwise from there. (bottom, left, top, right)

xlimits_real

The x-axis limits (lower and upper limits) at which point callouts are cut off.

width_char

The width of a character on the plot. Used to determine if a string is cut off.

xrange

The limits of the graph not taking into account a small amount of buffer room.

Value

The plot object with the callouts changed to not overlap with the x-axis limits.


USGS-R/repgen documentation built on April 14, 2021, 2:47 p.m.