briatte / ggnet

Network visualization with ggplot2
https://briatte.github.io/ggnet/
194 stars 33 forks source link

ggplot 3.3.4 required 'none' instead of FALSE in guides #49

Open Yannco5 opened 9 months ago

Yannco5 commented 9 months ago

Hey. I am using ggnet and when plotting a graph I get the following warning:

4: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as of ggplot2 3.3.4.
i The deprecated feature was likely used in the ggnet package.
  Please report the issue at <https://github.com/briatte/ggnet/issues>.

So I obey and report (great verobse msg by the way!)

Thanks and wonderful work image

briatte commented 5 months ago

Hi @Yannco5

Thanks a lot. Would you mind providing a reproducible example? I believe this might occur only when plotting text over nodes, but want to be sure.

iamYannC commented 5 months ago

Hi @Yannco5

Thanks a lot. Would you mind providing a reproducible example? I believe this might occur only when plotting text over nodes, but want to be sure.

hey.. long time since this issue :) Can't seem to reproduce this error now (I modified the initial code quite intensively) but my current plot includes guides and by setting 'none' myself it doesnt throw any errors

Its not reproducible since i generate the whole net myself with some modifications, but this guide function work fine, no errors related to it

 guides(size = "none",
         shape = guide_legend(title.position = "top",
                              title.hjust = 0.5,
                              direction = "vertical",
                              override.aes = list(size = lgnd_key_size)
         )
  )

Sorry for not providing any meaningful code

briatte commented 5 months ago

No worries @iamYannC, will do my best to reproduce at some point.

I'd like to recommend the ggnetwork or even better ggraph packages for network visualization. Their features extend well beyond what you will find in ggnet/ggnet2, which was kind of a first draft for ggnetwork. ggraph, in particular, is extremely versatile.