Comments (8)
That is strange as it should be available (it is imported from grid in the namespace file)
Can I get you to try and install the latest GitHub version, and if the problem persists, try to load grid
explicitly (library(grid)
) and see if that helps. If there's still a problem I would like to get a minimal reproducible example along with your session info...
from ggraph.
from ggraph.
Hmm... It still shouldn't do that - can you share the error producing code along with your session info
from ggraph.
############# error producing code
library(dplyr)
library(ggplot2)
library(ggraph)
library(ggiraph)
library(igraph)
library(ggnetwork)
Commodity = c("Oranges","Oranges","Passion","Meat","Oranges","Oranges","Bananas","Cucumber"," Maize" )
from = c("Kenya","Kenya","Kenya","Kenya","Kenya","Kenya","Kenya","Kenya","Kenya")
to = c( "China","Egypt","Zambia","Japan","Rwanda","Uganda","Egypt","Japan","Uganda")
edges = data.frame(Commodity, from, to)
edges<-edges%>%group_by(from,to)%>%
summarise(Com = toString(unique(Commodity)))
vertices<-unique(rbind(data.frame(name=edges$from,Legend="Source",Commodity=""),
data.frame(name=edges$to,Legend="Destination",Commodity=edges$Com)))
g <- graph_from_data_frame(edges, directed=TRUE,vertices=vertices)
V(g)$label<-as.character(V(g)$name)
V(g)$tooltip <- paste(unique(as.character(V(g)$name)),"\n","(",V(g)$Commodity,")")
gg_point_1 <-ggraph(g, layout = 'igraph',algorithm = 'kk')+
geom_edge_link(aes(x = x, y = y,label= V(g)$label[-(1:1)]),
arrow = arrow(length = unit(4, "mm"), type = "closed"),
label_colour = "blue",
angle_calc = 'along',
label_dodge = unit(2.5, 'mm'),
end_cap = circle(3, 'mm')) +
geom_node_point(size =5 ,color = "red")+
theme_blank() +
geom_point_interactive(aes(x = x, y = y,tooltip=tooltip,color=Legend),size=7)+
ggtitle(paste0("Title"))+
scale_color_brewer(palette="Dark2")+
theme(plot.title = element_text(color="darkblue", size=13, face="bold"))
ggiraph(code = print(gg_point_1 ),zoom_max = 3,width = 0.9,width_svg = 9,
height_svg = 8)
######## sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X El Capitan 10.11.4
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gdtools_0.1.3 ggnetwork_0.5.1 igraph_1.0.1 ggiraph_0.3.2.9000 ggraph_0.1.1 ggplot2_2.2.1
[7] dplyr_0.5.0 raster_2.5-8 sp_1.2-4
loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 sna_2.4 RColorBrewer_1.1-2 plyr_1.8.4 R.methodsS3_1.7.1
[6] R.utils_2.5.0 tools_3.3.2 digest_0.6.12 tibble_1.2 gtable_0.2.0
[11] lattice_0.20-34 DBI_0.5-1 ggrepel_0.6.5 xml2_1.1.1 htmlwidgets_0.8
[16] grid_3.3.2 R6_2.2.0 rvg_0.1.2 tweenr_0.1.5 deldir_0.1-12
[21] udunits2_0.13 magrittr_1.5 scales_0.4.1 htmltools_0.3.5 MASS_7.3-45
[26] units_0.4-2 assertthat_0.1 ggforce_0.1.1 colorspace_1.3-2 labeling_0.3
[31] network_1.13.0 lazyeval_0.2.0 munsell_0.4.3 statnet.common_3.3.0 R.oo_1.21.0
from ggraph.
Hmm... I cannot reproduce. Can I get you to test if you get the error when you run the code without ggiraph calls?
from ggraph.
It works fine without ggiraph calls.
from ggraph.
There's some strangeness going on in that interaction then. As it is solved by loading grid I won't look more into it now as ggraph
itself works, but might look further when time permits
from ggraph.
Ok, thank you!
from ggraph.
Related Issues (20)
- labels are cut off on the sides HOT 2
- Revdep check failure with upcoming ggplot2 3.5.0
- -e HOT 1
- Release ggraph 2.2.0
- algorythmn is arranging circles in wrong manner HOT 1
- Accessing Package From Network without Internet
- ```collapse = "all"``` for get_edges not working
- Documentation on geom_edge_link incomplete HOT 6
- Failing installations of ggraph 2.2.0 with R versions 3.6 and 4.0 HOT 15
- ggraph unable to collate and parse R files for package βggraphβ HOT 1
- System crash with line cutter HOT 5
- geom_conn_bundle_text HOT 1
- Preserve tip lengths in dendrogram (similarly to `plot.hclust()`) HOT 2
- Feature request: Support additional "arrowhead" types
- Some stats fail when the filter selects no data
- Allow different end_shapes to be passed to geom_edge_span
- Problem on edge colour geom_edge_link colour and node colour geom_node_point HOT 1
- Cannot use color aes in geom_edge_bundle_force HOT 2
- linetype in geom_node_circle not being mapped correctly
- question: having an absolute location custom layout.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggraph.