Skip to contents

Move an object

Usage

nudge(object, x, y, ...)

Arguments

object

object

x

nudge right and left

y

nudge up and down

...

<dynamic-dots> properties passed to style

Value

object of same class as object

Examples

ob_circle() |> nudge(x = 2)
#> S3<ggdiagram::ob_circle/ggdiagram::centerpoint/ggdiagram::xy/ggdiagram::shape/ggdiagram::has_style/S7_object>
#> @ center:S3<ggdiagram::ob_point/ggdiagram::xy/ggdiagram::shape/ggdiagram::has_style/S7_object>
#> @ x: num 2
#> @ y: num 0
#> Other props: alpha, color, fill, shape, size, stroke, auto_label,
#>              bounding_box, centroid, length, r, theta, style,
#>              tibble, xy, geom, label, place, aesthetics
#> @ radius: num 1
#> Other props: label, alpha, color, fill, linewidth, linetype,
#>              n, area, bounding_box, circumference, diameter,
#>              length, polygon, style, tibble, geom, arc, angle_at,
#>              normal_at, tangent_at, place, point_at, aesthetics
# Alternative to nudge:
ob_circle() + ob_point(2, 0)
#> S3<ggdiagram::ob_circle/ggdiagram::centerpoint/ggdiagram::xy/ggdiagram::shape/ggdiagram::has_style/S7_object>
#> @ center:S3<ggdiagram::ob_point/ggdiagram::xy/ggdiagram::shape/ggdiagram::has_style/S7_object>
#> @ x: num 2
#> @ y: num 0
#> Other props: alpha, color, fill, shape, size, stroke, auto_label,
#>              bounding_box, centroid, length, r, theta, style,
#>              tibble, xy, geom, label, place, aesthetics
#> @ radius: num 1
#> Other props: label, alpha, color, fill, linewidth, linetype,
#>              n, area, bounding_box, circumference, diameter,
#>              length, polygon, style, tibble, geom, arc, angle_at,
#>              normal_at, tangent_at, place, point_at, aesthetics