Learn R Programming

ggVennDiagram (version 1.2.3)

triangle: defined a triangle by three points

Description

defined a triangle by three points

Usage

triangle(xy = c(0, 0, 1, 0, 0, 1))

Value

a matrix with xy coordinates

Arguments

xy

coordinates of the three points defining a triangle

Examples

Run this code
# triangle coordinates
library(ggVennDiagram)
library(sf)
triangle()

# plot a new triangle
triangle(c(-1,0,1,0,0,2)) %>% st_linestring() %>% plot()

Run the code above in your browser using DataLab