Re: [R] figure margins too large for a barplot in png, pdf ok

From: Charilaos Skiadas <cskiadas_at_gmail.com>
Date: Tue, 06 May 2008 22:51:48 -0400

On May 6, 2008, at 10:43 PM, Alexy Khrabrov wrote:

> I've used to have a script with a barplot command it in, preceded
> by a png:
>
> png(graph.file,height=H,width=W)
> barplot(t,names.arg=breaks[2:(length(t)+1)],tck=gridlines)
>
> -- worked before R 2.6.2. When I tried it in R 2.6.2, which I have
> for a while but didn't run with that script, it complained, the
> margins too large, and I've googled the messages from our list
> where neither height nor width had been specified. Yet here they
> are specified here.
>
> Calling same from R GUI draws the nice barplot in Quartz, and
> replacing png with pdf or postscript does fine. Other graphs work
> fine with png. Jpeg also complains; when I try various values for
> H or W, still the same -- how can I subdue the png?

What values do H,W have? Keep in mind, the numbers count pixels in png. And you have not given us a reproducible example.

> Cheers,
> Alexy

Haris Skiadas
Department of Mathematics and Computer Science Hanover College



R-help_at_r-project.org 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. Received on Wed 07 May 2008 - 03:00:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 07 May 2008 - 03:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive