Learn R Programming

MSG (version 0.9)

heart_curve: Draw a heart curve

Description

Calculate the coordinates of a heart shape and draw it with a polygon.

Usage

heart_curve(n = 101, ...)

Arguments

n

the number of points to use when calculating the coordinates of the heart shape

...

other arguments to be passed to polygon, e.g. the color of the polygon (usually red)

Author

Yihui Xie <https://yihui.org>

Examples

Run this code
heart_curve()
heart_curve(col = "red")
heart_curve(col = "pink", border = "red")

Run the code above in your browser using DataLab