Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network_plot() colours not correct if only positive correlations are plotted #19

Closed
drsimonj opened this issue Aug 5, 2016 · 6 comments

Comments

@drsimonj
Copy link
Collaborator

drsimonj commented Aug 5, 2016

network_plot() with only positive correlations shown result in red paths being drawn. E.g., try mtcars %>% correlate() %>% network_plot(min_cor = .9)

This is probably because the colours are not explicitly assigned.

@mhnierhoff
Copy link

mhnierhoff commented Aug 5, 2016

Hi,
for me network_plot returns the following error message:

Error in function_list[[k]](value) : 
  could not find function "network_plot"

@drsimonj
Copy link
Collaborator Author

drsimonj commented Aug 5, 2016

Hi @mhnierhoff, are you using the latest development version (0.1.0.900)?

If not, install via:

install.packages("devtools")
devtools::install_github("drsimonj/corrr")

@mhnierhoff
Copy link

mhnierhoff commented Aug 8, 2016

Hi @drsimonj thanks for your quick reply. I installed the lastest dev version and the error messages does not pop up. But now the plot is just empty in the RStudio plot pane and the correlations for the network plot only become visible when I click on the Export button.

Pane View:
snap 2016-08-08 at 11 46 10

After Export Button:
snap 2016-08-08 at 11 46 28

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] corrr_0.1.0.9000 reshape2_1.4.1   reshape_0.8.5    dtplyr_0.0.1     plyr_1.8.4       xts_0.9-7       
[7] zoo_1.7-13       dplyr_0.5.0      corrplot_0.77   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6      knitr_1.13       magrittr_1.5     devtools_1.12.0  munsell_0.4.3    colorspace_1.2-6
 [7] lattice_0.20-33  R6_2.1.2         httr_1.2.1       stringr_1.0.0    tools_3.3.1      grid_3.3.1      
[13] gtable_0.2.0     DBI_0.4-1        git2r_0.15.0     withr_1.0.2      digest_0.6.10    lazyeval_0.2.0  
[19] assertthat_0.1   tibble_1.1       ggplot2_2.1.0    tidyr_0.5.1      ggrepel_0.5      curl_1.1        
[25] rsconnect_0.4.3  memoise_1.0.0    labeling_0.3     stringi_1.1.1    scales_0.4.0   

@mhnierhoff
Copy link

Oh - I found out that the visbility of the correlation lines depends on the pane size for plots. I just moved RStudio to another screen and made the right panes smaller and et voila the network lines are now visibile. But I don't think that this behavior is intended. ;)

@drsimonj
Copy link
Collaborator Author

drsimonj commented Aug 8, 2016

Thanks @mhnierhoff. The plot is being made with ggplot2, so I'm not sure if it's something specific to network_plot() or ggplot2. I'll keep an eye on this and see if this behaviour can be fixed.

@github-actions
Copy link

github-actions bot commented Mar 7, 2021

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants