Skip to content
Back to formatted view

Raw Message

Message-ID: <462FA5D8-E30A-469E-BBB4-62F7AF4889F2@ed.ac.uk>
Date: 2011-07-20T09:55:03Z
From: Timothy Bates
Subject: Error in plot.new() : figure margins too large

Dear Mac R users,

Not sure if this is mac/quartz specific or not.

With my default graph size (about 3*3 inches), this code:

layout(matrix(c(1, 2, 3, 3), 2, byrow = TRUE))
plot(1:10); plot(11:20); plot(21:40)


Gives the error "Error in plot.new() : figure margins too large?:

If I expand the quartz window, run the code (error free), then reduce the window (generating an in window ?margins" error message), then expand again: it redraws itself just fine.

Question: Why doesn?t the code execute the same way when the window is initially too small? (i.e., draw into a window minimally big enough to allow the scaled graph to be rendered, then try rendering in the desired window, keeping the plot code intact and making an in-window error if necessary)?

best, tim

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.