jokergoo / circlize

Circular visualization in R
http://jokergoo.github.io/circlize_book/book/
Other
959 stars 141 forks source link

circos.par is not working #362

Open tuntscha opened 1 year ago

tuntscha commented 1 year ago

Hello, I amable to change the parameters of circos.par$track.height (and others as well) and I can verify that I have changed them, but they are not working. Even if I repeat the examples from the documentation, it is not working.

Do you have any idea why this is happening? I am using RStudio 2022.12.0 Build 353 and R x64 4.1.2.

Thanks a lot for your feedback and thank you for the great package

Cheers Tanja

circos par not working

tuntscha commented 1 year ago

Hello all, I found the fix for it: first I upgraded to R4.13 (not sure if this is relevant). But I noticed that the function circos.par is used in package circlize and in ggplot2 and this caused some confusion.. The fix is to use circlize::circos.par when setting the parameters. circos par working

Cheers Tanja

jokergoo commented 1 year ago

Or you can try to run circos.clear() before circos.par()?

tuntscha commented 1 year ago

Hi jokergoo, I did try this, but it did not help. However, the method described in my last comment works fine... Background: When I am loading the circlize library (after loading tidyverse and ggplot2 librariesI am getting this warning message: "Attache Paket: ‘circlize’ Das folgende Objekt ist maskiert durch ‘.GlobalEnv’: (the following object is masked by "GlobalEnv': circos.par "

Again, I can use your package and I like it a lot!

Thanks a lot for responding to my issue.

Cheers Tanja

jokergoo commented 1 year ago

Das folgende Objekt ist maskiert durch ‘.GlobalEnv’: (the following object is masked by "GlobalEnv': circos.par "

It should not be in the global environment. Let me have a check.

jokergoo commented 1 year ago

This is strange, because circlize has nothing related to ggplot2 or tidyverse, also circos.par() should only stay in the circlize package while not in .GlobalEnv.

What is the version of circlize you use?

Can you restart your R session and rerun everything?

Have you directly sourced the code in circlize? (because this is the only way to put circos.par() in .GlobalEnv)

tuntscha commented 1 year ago

I am using circlze version 0.4.15. After the problem occured, I upgraded my R version and restarted everthing and the problem persists. I have also restarted R multiple times and the only fix for me is using circlize::circos.par(). I don't know what you mean by "directly sourced the code in circlize"? Could you please explain this to me?

Thanks again Tanja

jokergoo commented 1 year ago

If you don't know what is "sourcing the code", then most probably you didn't do it :) (I mean using source() function to directly load the R source code from the package).

This is a strange behavior. Hope I can reproduce it in the future.