Plots a label corresponding to an edge in a network plot.
network.edgelabel.RdDraws a text labels on (or adjacent to) the line segments connecting vertices on a network plot.
Arguments
- px0
vector of x coordinates of tail vertex of the edge
- py0
vector of y coordinates of tail vertex of the edge
- px1
vector of x coordinates of head vertex of the edge
- py1
vector of y coordinate of head vertex of the edge
- label
vector strings giving labels to be drawn for edge edge
- directed
logical: is the underlying network directed? If FALSE, labels will be drawn in the middle of the line segment, otherwise in the first 3rd so that the labels for edges pointing in the opposite direction will not overlap.
- loops
logical: if true, assuming the labels to be drawn belong to loop-type edges and render appropriately
- cex
numeric vector giving the text expansion factor for each label
- curve
numeric vector controling the extent of edge curvature (0 = straight line edges)
- ...
additional arguments to be passed to
text
Details
Called internally by plot.network when edge.label
parameter is used. For directed, non-curved edges, the labels are shifted
towards the tail of the edge. Labels for curved edges are not shifted
because opposite-direction edges curve the opposite way. Makes a crude
attempt to shift labels to either side of line, and to draw the edge labels
for self-loops near the vertex. No attempt is made to avoid overlap between
vertex and edge labels.