ggplot(n) returns blank plot
- Dominant language
- HTML
- Stars
- 154
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
As the title describes. I cannot get the ggplot method to plot my own network or even the network from the tutorial. The network is created and can be visualised (not so nicely) with plot(n) but ggplot(n) returns a blank plot.
```r
library(ggplot2)
library(network)
library(sna)
library(ggnetwork)
n <- network(rgraph(10, tprob = 0.2), directed = FALSE)
n %v% "family" <- sample(letters[1:3], 10, replace = TRUE)
n %v% "importance" <- sample(1:3, 10, replace = TRUE)
e <- network.edgecount(n)
set.edge.attribute(n, "type", sample(letters[24:26], e, replace = TRUE))
set.edge.attribute(n, "day", sample(1:3, e, replace = TRUE))
theme_blank
ggnetwork(n, layout = "fruchtermanreingold", cell.jitter = 0.75)
ggnetwork(n, layout = "target", niter = 100)
ggplot(n)
```
Contributor guide
Research direction
Start by running the reproducible R example from the issue, including the two ggnetwork calls and the final ggplot(n) call, and compare their output. Trace why ggplot(n) produces a blank plot; done means the supplied network renders through ggplot rather than appearing blank.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100