Render igraph arrows
numeric
coordinates for initial and final x and y
coordinates.
integer
indicating the position of arrow:
code=1
arrow is positioned on the line end
code=2
arrow is positioned on the line start
code=3
arrow is positioned on both ends of the line
numeric
scaled size of the arrow head, which is applied to
both the length and width of the arrow head.
numeric
scalar for the arrow head width, which is only
applied to the relative arrow width.
logical
indicating whether the arrow head should be a filled
polygon, otherwise only the outer "V" lines are drawn.
numeric
adjustment for segment length, where:
sh.adj=0
will extend the edge line (underneath the arrow head)
to the end of the line
sh.adj=1
will extend the edge line only to the base of the arrow head
sh.adj=1.1
will leave a gap approximately 10% the arrow head length,
between the edge line and the start of the arrow head.
numeric
line width of main segment edge line
character
color of main segment edge line
numeric
line type of main segment edge line
character
arrow head color and arrow head border
color, respectively.
numeric
arrow head line width
numeric
arrow head line type
logical
indicating whether to draw only arrows,
or arrows_only=FALSE
to draw arrows and edge lines.
logical
indicating whether to draw curved edges
logical
indicating whether to print verbose output.
This function is a mimic of the internal igraph:::igraph.Arrows()
which is not permitted to be called directly for CRAN-approved
R packages.
Other jam igraph internal functions:
default_igraph_values()
,
get_igraph_arrow_mode()
,
parse_igraph_plot_params()
plot(NULL, xlim=c(-3, 3), ylim=c(-4, 4), type="n", xlab="", ylab="", bty="n")
jam_igraph_arrows(-2, 3, 2, 3, code=1, open=FALSE, sh.col="blue", sh.lwd=2)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] 3
#>
jam_igraph_arrows(-2, 2, 2, 2, code=2, open=FALSE, sh.col="red", sh.lwd=2)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] 2
#>
jam_igraph_arrows(-2, 1, 2, 1, code=3, open=FALSE, sh.col="gold", sh.lwd=2)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] 1
#>
jam_igraph_arrows(-2, 0, 2, 0, code=3, arrows_only=TRUE, open=FALSE, sh.col="purple4", sh.lwd=2)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] 3.265725e-16
#>
jam_igraph_arrows(-2, -1, 2, -1, code=1, open=FALSE, sh.col="blue", h.col="#FF000055", sh.lwd=2, size=2, sh.adj=0.1)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] -1
#>
jam_igraph_arrows(-2, -2, 2, -2, code=1, open=FALSE, sh.col="blue", h.col="#FF000055", sh.lwd=2, size=2, sh.adj=1.1)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] -2
#>
jam_igraph_arrows(-2, -3, 2, -3, code=2, open=FALSE, sh.col="blue", h.col="#FF000055", sh.lwd=2, size=2, sh.adj=1.1)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] -3
#>
jam_igraph_arrows(-2, -4, 2, -4, code=3, open=FALSE, sh.col="blue", h.col="#FF000055", sh.lwd=2, size=2, sh.adj=1.1)
#> $lab.x
#> [1] -0.6666667
#>
#> $lab.y
#> [1] -4
#>
text(x=rep(0, 8), y=seq(from=3, to=-4)+0.2,
labels=c("code=1",
"code=2",
"code=3",
"code=3, arrows_only=TRUE",
"code=1, size=2, sh.adj=0.1",
"code=1, size=2, sh.adj=1.1",
"code=2, size=2, sh.adj=1.1",
"code=3, size=2, sh.adj=1.1"))