R interface: Confused about curved parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
High
|
Gábor Csárdi |
Bug Description
Attempting to draw a grap with some loop edges and the rest curved, I specified a curved parameter of length the total number of edges. When it gets to the following call in plot.igraph, the lengths of curved and x0 are different (20 and 16 in my case).
igraph.
Should I specify curved only for the non-loop edges (which feels inconsistent, as everything else is one value per edge), or does the code need an extra line like the following inside the if test just before the above call?
if (length(curved)>1) { curved <- curved[nonloops.e] }
igraph 0.5.3, R 2.10.0 patched, Windows Vista. - transcript is:
> nodes <- data.frame(
+ color=c(
+ frame.color=
+ shape=c(
+ label=c(
+ x=c(rep(
+ y=c(rep(
> nn <- as.character(
> edges <- data.frame(
+ to=c(nn[
+ loop.angle=
+ curved=
+ lty=rep(1,20),
+ color=rep(
> gg <- graph.data.
> plot(gg,
Error in lambda * 1/2 * (c.y2 - c.y1) :
(converted from warning) longer object length is not a multiple of shorter object length
>
Thankyou,
Keith Ponting
Changed in igraph: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in igraph: | |
assignee: | nobody → Gábor Csárdi (gabor.csardi) |
Yep, exactly, I have added that line, and it works fine. Fixed in revision #1574 (0.5-main) and #1763 (0.6-main).
Thanks for the detailed report!