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

Daniel picture Daniel · Mar 30, 2016 · Viewed 28k times · Source

Using R Studio when trying to plot an xts object using chartSeries() the following error pop's up:

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

However when plotting it directly in R there is no problem with the margins size.

How can I correct the margins size for R Studio.

Note: the time series has more than 10,000 observations/entries

Thanks

Answer

Hiren picture Hiren · Nov 29, 2016

write this three lines:

graphics.off() par("mar") par(mar=c(1,1,1,1))