2

I'm using corrplot package in R (for mac) and I have a error message

Error in strwidth("W", cex = tl.cex) : plot.new has not been called yet

Could anyone help me?


Some more details:

I am trying to use these commands for visualize Pearson correlation plot with circle + black number

corrplot(x.cor, order = "original", type = "upper", tl.pos = "tp") 

corrplot(x.cor, add = TRUE, type = "lower", method = "number", 
         order = "original", col = "black", diag = FALSE,
         tl.pos = "n", cl.pos = "n") 

The first command is well performed but I have problem for second command with below error and white window (quartz 2) without plot:

Error in strwidth("W", cex = tl.cex) : plot.new has not been called yet

user20650
  • 24,654
  • 5
  • 56
  • 91
  • 2
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Feb 10 '20 at 22:11
  • Please add data and the code you used to produce the issue. If you can't, perhaps this post might help you: https://stackoverflow.com/questions/7154133/plot-new-has-not-been-called-yet – Phil_T Feb 10 '20 at 23:24
  • I am trying to use these commands for visualize pearson correlation plot with circle + black number corrplot(x.cor, order = "original", type = "upper", tl.pos = "tp") corrplot(x.cor, add = TRUE, type = "lower", method = "number", order = "original", col = "black", diag = FALSE, tl.pos = "n", cl.pos = "n") first command is well performed but I have problem for second command with below error and white window (quartz 2) without plot: Error in strwidth("W", cex = tl.cex) : plot.new has not been called yet Thank you very very much in advance for your answers. – Parisa Yazdanpanah Feb 11 '20 at 06:55
  • I am trying to use these commands for visualize pearson correlation plot with circle + black number corrplot(x.cor, order = "original", type = "upper", tl.pos = "tp") corrplot(x.cor, add = TRUE, type = "lower", method = "number", order = "original", col = "black", diag = FALSE, tl.pos = "n", cl.pos = "n") first command is well performed but I have problem for second command with below error and white window (quartz 2) without plot: Error in strwidth("W", cex = tl.cex) : plot.new has not been called yet Thank you very very much in advance for your answers. – Parisa Yazdanpanah Feb 11 '20 at 10:14
  • @ParisaYazdanpanah; can you add the details of `sessionInfo()` to your question please as this looks like it may be system dependent. Also you are more likely to get an answer if you add a small example of `x.cor`; it doesnt need to be your real data but just enough to reproduce your error. thanks – user20650 Feb 13 '20 at 18:20

0 Answers0