Re: [R] Error in plot.new() : figure margins too large

2007-05-09 Thread gatemaze
On 09/05/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
>
> On Wed, 9 May 2007, [EMAIL PROTECTED] wrote:
>
> > The code is:
> >
> > postscript(filename, horizontal=FALSE, onefile=FALSE, paper="special",
>
> You have not set a width or height, so please do your homework.


Thanks a lot for that and to Phil for replying. Just a minor "correction" to
your post. "You have not set a width AND height". Both seem to be required.
I had tried only with width thinking height would be calculated relatively
but I was still getting the same error.

> bg="white", family="ComputerModern", pointsize=10);
> > par(mar=c(5, 4, 0, 0) + 0.1);
> > plot(x.nor, y.nor, xlim=c(3,6), ylim=c(20,90), pch=normal.mark);
> >
> > gives error
> > Error in plot.new() : figure margins too large
> >
> > plotting on the screen without calling postscript works just fine .
> >
> > Any clues? Thanks.
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > [email protected] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> --
> Brian D. Ripley,  [EMAIL PROTECTED]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
>

[[alternative HTML version deleted]]

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in plot.new() : figure margins too large

2007-05-09 Thread Prof Brian Ripley
On Wed, 9 May 2007, [EMAIL PROTECTED] wrote:

> Yes, I already had a look on previous posts but nothing is really helpful to
> me.

I have never seen anyone do this before 

> The code is:
>
> postscript(filename, horizontal=FALSE, onefile=FALSE, paper="special",

You have not set a width or height, so please do your homework.

> bg="white", family="ComputerModern", pointsize=10);
> par(mar=c(5, 4, 0, 0) + 0.1);
> plot(x.nor, y.nor, xlim=c(3,6), ylim=c(20,90), pch=normal.mark);
>
> gives error
> Error in plot.new() : figure margins too large
>
> plotting on the screen without calling postscript works just fine .
>
> Any clues? Thanks.
>
>   [[alternative HTML version deleted]]
>
> __
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in plot.new() : Figure margins too large

2007-01-11 Thread Peter Dalgaard
Antje wrote:
> Hmm, but what can be the solution? Any idea? Or any documentation on 
> that which I could read to find a solution by myself?
>
> with the windows statement, I wanted to achive a format which fits for 
> my plots, so that each plot will have a quadratic area.
>   
OK, so what was the pdf() for?...

Notice that this creates subplots which are one inch square.  By
default  plots are surrounded by 9.2 lines of text vertically (and 6.2
horisontally). Now the distance between lines of text depends on the
pointsize, which is 12pt by default. In subplots, I believe it is
somewhat smaller (8pt?), but 9.2 lines of text still leaves no room for
the actual plot. So, look at help(par) and help(windows) and start
fiddling with pointsize, mar, mgp, and maybe more.
> I guess, I did not unstand that much of windows / margins and plotting 
> areas. Maybe someone can help me (even with a good overview on these 
> basics...)
>
> Antje
>
>
>
> Peter Dalgaard schrieb:
>   
>> Antje wrote:
>> 
>>> Hello,
>>>
>>> was could be the reason for such an error message???
>>>   
>>>   
>> Generically, that the (per-subplot) figure region is so small that
>> subtracting margins leaves nowhere to plot. Reasons include: Plotting
>> area too small, too many subplots, too many lines of text in margins,
>> too large font size in margins.
>>
>> 
>>> I'd like to create a window with 10x6 barplot and save it as pdf.
>>>
>>> I tried:
>>>
>>> pdf("histogram.pdf",width=7, height=7)
>>>   
>>>   
>> What did you expect the following line to do? I think it doesn't...
>> 
>>> windows(cols, rows)
>>>   
>>>   
>> 
>>> par(mfcol = c(rows,cols))
>>>
>>> sapply(mat, calcHist)
>>>
>>> dev.off()
>>>
>>> Within the method of sapply, I call barplot
>>>
>>> What is wrong???
>>>
>>> Antje
>>>
>>> __
>>> [email protected] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>   
>>>   
>> 
>
> __
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   


-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in plot.new() : Figure margins too large

2007-01-11 Thread Antje
Hmm, but what can be the solution? Any idea? Or any documentation on 
that which I could read to find a solution by myself?

with the windows statement, I wanted to achive a format which fits for 
my plots, so that each plot will have a quadratic area.

I guess, I did not unstand that much of windows / margins and plotting 
areas. Maybe someone can help me (even with a good overview on these 
basics...)

Antje



Peter Dalgaard schrieb:
> Antje wrote:
>> Hello,
>>
>> was could be the reason for such an error message???
>>   
> Generically, that the (per-subplot) figure region is so small that
> subtracting margins leaves nowhere to plot. Reasons include: Plotting
> area too small, too many subplots, too many lines of text in margins,
> too large font size in margins.
> 
>> I'd like to create a window with 10x6 barplot and save it as pdf.
>>
>> I tried:
>>
>> pdf("histogram.pdf",width=7, height=7)
>>   
> What did you expect the following line to do? I think it doesn't...
>> windows(cols, rows)
>>   
> 
> 
>> par(mfcol = c(rows,cols))
>>
>> sapply(mat, calcHist)
>>
>> dev.off()
>>
>> Within the method of sapply, I call barplot
>>
>> What is wrong???
>>
>> Antje
>>
>> __
>> [email protected] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>   
> 
>

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in plot.new() : Figure margins too large

2007-01-11 Thread Peter Dalgaard
Antje wrote:
> Hello,
>
> was could be the reason for such an error message???
>   
Generically, that the (per-subplot) figure region is so small that
subtracting margins leaves nowhere to plot. Reasons include: Plotting
area too small, too many subplots, too many lines of text in margins,
too large font size in margins.

> I'd like to create a window with 10x6 barplot and save it as pdf.
>
> I tried:
>
> pdf("histogram.pdf",width=7, height=7)
>   
What did you expect the following line to do? I think it doesn't...
> windows(cols, rows)
>   


> par(mfcol = c(rows,cols))
>
> sapply(mat, calcHist)
>
> dev.off()
>
> Within the method of sapply, I call barplot
>
> What is wrong???
>
> Antje
>
> __
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   


-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.