Skip to content

Edges disappear after second identical plot() statement; when using transparent edge colors (alpha < 1).  #640

@clpippel

Description

@clpippel

Describe the bug
Edges disappear after second identical plot() statement when using transparent edge colors (alpha < 1).

Note par()$xpd is flipped from FALSE to TRUE.

To reproduce

library(igraph)
g <- graph_from_literal(A +-+ B)
dev.new(); par()$xpd                # xpd = FALSE

# First  try after dev.new(), edge is  visible.
plot(g,  edge.color=rgb(0,0,0,0.3));
par()$xpd                           # xpd = TRUE

# Second try, edge is not visible.
# Edge becomes visible after save as .pdf").
plot(g,  edge.color=rgb(0,0,0,0.3)) 

# Third try. 
par(xpd=FALSE)                      # reset xpd 
plot(g,  edge.color=rgb(0,0,0,0.3)) # Edge is visible again.

Version information

  • R/igraph version: [1] compiler_4.1.3 magrittr_2.0.1 rlang_1.0.5 pkgconfig_2.0.3

  • R version: R version 4.1.3 (2022-03-10)

  • Operating system: Windows 10 x64 (build 22621)
    edges-disappear-after-second-identical-plot-statement-when-using-transparent-edge-color

Metadata

Metadata

Assignees

Labels

bugan unexpected problem or unintended behaviorplotting 💹Issues related to plotting

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions