Description Usage Arguments Value Examples
Draw
plots geometric objects
1 |
object |
geometric object of any of these five types: point, segment, arc, line or polygon. A point is simply a vector of length 2, which contains the xy-coordinates for the point. For the other four types, there can be created with any of the following functions: |
colors |
Vector containing information about the color for the object to be plotted. In the case of polygons, the vector should have length 2 to define the background color and the border color (in this order). Moreover, it can be used |
label |
Boolean, only used for polygons. When |
None. It produces the plot of a geometric object (point, segment, arc, line or polygon) in the current coordinate plane
1 2 3 4 5 6 7 8 9 10 | x_min <- -5
x_max <- 5
y_min <- -5
y_max <- 5
CoordinatePlane(x_min, x_max, y_min, y_max)
P1 <- c(0,0)
P2 <- c(1,1)
P3 <- c(2,0)
Poly <- CreatePolygon(P1, P2, P3)
Draw(Poly, c("blue"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.