You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when plotting networks having thousands of edges, the plot.network function ends in a segfault or any other unexpected behaviour causing R to crash.
Using those package versions, the suggested solutions Solution 1 and Solution 2 should work.
@hechtlC If you still have some plotting problems using those versions, let us now.
Additional Information
For future improvement, we should make the layout configurable, so that the end user can easily choose another layout. Nevertheless, first, we should use the "kk" layout as default, as some things for enabling configurable layout have to be figured out first...
The text was updated successfully, but these errors were encountered:
Description
Sometimes, when plotting networks having thousands of edges, the
plot.network
function ends in a segfault or any other unexpected behaviour causing R to crash.Thanks to @hechtlC for reporting this bug.
Suggested solutions
After trying out some things, @clhunsen and me found two different solutions, which are described in the following:
Solution 1: Do not directly plot the network by
plot.network
, but get the plot object and save it to file:Depending on R version and some other circumstances, this might work in most cases.
Solution 2: It turned out that the segfaults may be caused by the layout. Therefore, do use another layout, we suggest the "kk" layout as default.
The only thing to do is the following replacement:
In
util-plot.R
replace the following statement, which defines the layout,https://github.com/se-passau/codeface-extraction-r/blob/34b9d35617e0d043d86a457b56d2ebc0a5ef02cd/util-plot.R#L120
by
Then you should be able to use
plot.networks(network)
without any problems.Using the "kk" layout did work in all our tries, so we should use "kk" as default layout.
Versions
The described problems and solutions address versions 3.x of this network library.
There may be additional problems using outdated packages. Therefore, you should at least use the following package versions:
viridis
0.4.1viridisLite
0.2.0ggraph
1.0.0ggplot2
2.2.1Using those package versions, the suggested solutions Solution 1 and Solution 2 should work.
@hechtlC If you still have some plotting problems using those versions, let us now.
Additional Information
For future improvement, we should make the layout configurable, so that the end user can easily choose another layout. Nevertheless, first, we should use the "kk" layout as default, as some things for enabling configurable layout have to be figured out first...
The text was updated successfully, but these errors were encountered: