Error in plot.new -- Error in plot.new() : figure margins too large

plot

#1

Trying to plot on Rstudio but gives error .Plot function is working on R base version.

set.seed(1)

x <- rnorm(100)
log.mu <- 0.5 + 0.3 * x
y <- rpois(100, exp(log.mu))
summary(y)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 1.00 1.00 1.55 2.00 6.00
plot(x , y)

Error in plot.new() : figure margins too large

Rstudio version:
$mode
[1] "desktop"

$version
[1] ‘1.1.447’

rstudio session info:
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.5.0 magrittr_1.5 R6_2.2.2 tools_3.5.0 RCurl_1.95-4.10 yaml_2.1.19 swirl_2.4.3 stringi_1.1.7
[10] stringr_1.3.1 digest_0.6.15 testthat_2.0.0 rlang_0.2.0 bitops_1.0-6


#2

What seems to be the standard source of this error is that your Plots panel window in the RStudio IDE is too small to support your plot. Try making that Plots window larger and running the code again.

Error replication:

Solved


#3

thank you it worked...


#4

If your question's been answered, would you mind choosing a solution? (see FAQ below for how) It makes it a bit easier to visually navigate the site and see which questions still need help.

Thanks