
Last chance! 50% off unlimited learning
Sale ends in
gplot.vertex
adds one or more vertices (drawn using polygon
) to a plot.
gplot.vertex(x, y, radius = 1, sides = 4, border = 1, col = 2,
lty = NULL, rot = 0, ...)
a vector of x coordinates.
a vector of y coordinates.
a vector of vertex radii.
a vector containing the number of sides to draw for each vertex.
a vector of vertex border colors.
a vector of vertex interior colors.
a vector of vertex border line types.
a vector of vertex rotation angles (in degrees).
Additional arguments to polygon
None
gplot.vertex
draws regular polygons of specified radius and number of sides, at the given coordinates. This is useful for routines such as gplot
, which use such shapes to depict vertices.
# NOT RUN {
#Open a plot window, and place some vertices
plot(0,0,type="n",xlim=c(-1.5,1.5),ylim=c(-1.5,1.5),asp=1)
gplot.vertex(cos((1:10)/10*2*pi),sin((1:10)/10*2*pi),col=1:10,
sides=3:12,radius=0.1)
# }
Run the code above in your browser using DataLab