Ggraph: problem with repel = TRUE for geom_node_text

Created on 2 Nov 2016  Â·  12Comments  Â·  Source: thomasp85/ggraph

Thanks so much for your work on this great package.

I am having trouble with using geom_node_text with the current development version of ggplot2; I think this must be a very new problem because I wasn't having this problem until just recently.

If I do something like this:

gr <- make_graph('bull')
V(gr)$class <- sample(letters[1:3], gorder(gr), replace = TRUE)

gr %>%
  ggraph(layout = "fr") + 
  geom_node_text(aes(label = class), repel = TRUE) +
  geom_edge_link() +
  theme_void()

then I get this error:

Error: GeomTextRepel was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.

There are no errors without repel = TRUE.

Most helpful comment

It should but it might not have propagated to CRAN yet? Try to install it from GitHub instead

devtools::install_github('slowkow/ggrepel')

All 12 comments

There has just been some updates to the underlying ggproto implementation in ggplot2. Try to install all affected package from fresh (both ggplot2, ggrepel, geforce, and ggraph)

This seemed to do the trick for me at last...

Ah, ggrepel! I had re-installed all but that one.

You were on the right track then - thanks for the mention in the tidy text book :-)

Yep, that fixed it. Thanks! 🙌

I am still having issues.

Error: GeomTextRepel was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.

I tried

devtools::install_github('hadley/ggplot2')
devtools::install_github('thomasp85/ggforce')
devtools::install_github('thomasp85/ggraph')

I cant seem to install/find the package ggproto either.

reinstall ggrepel

I did that to via install.packages('ggrepel')

Would that get me the latest version?

It should but it might not have propagated to CRAN yet? Try to install it from GitHub instead

devtools::install_github('slowkow/ggrepel')

That worked!
Thanks so much.

I have installed the packages (ggrepel, ggplot2, ggmap, ggforce, ggraph) from GitHub but still get the following error

p <- ggmap(map)
Error in get("f", environment(CoordMap$train)) : object 'f' not found
Any further suggestions?

This seems like a problem with ggmap and not ggraph — I suggest you raise the issue there

@brophyj

Did you ever find a solution?
I have to user an older version of ggplot --> devtools::install_github("hadley/[email protected]")
in order for ggmap to work properly.

This is odd. I want to use other packages like plotly, for example, which require newer versions of ggplot. When I update to most recent ggplot I get errors like the other ones described on this page, when I try to use ggmap. I also reinstalled (ggrepel, ggplot2, ggmap, ggforce, ggraph) as you did, from dev tools.

Was this page helpful?
0 / 5 - 0 ratings