Re: [R] How to change the margin widths in png-plots?

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Mon 19 Jun 2006 - 17:34:30 EST

Hi

Perfectly official solution.

First open graphic device (ps, png, jpeg, ...) and then change parameters according to your wish.

HTH
Petr

On 19 Jun 2006 at 10:15, Atte Tenkanen wrote:

Date sent:      	Mon, 19 Jun 2006 10:15:28 +0300
From:           	Atte Tenkanen <attenka@utu.fi>
To:             	r-help@stat.math.ethz.ch
Priority:       	normal
Subject:        	Re: [R] How to change the margin widths in png-plots?

> I found one solution. It may be unofficial but it works. I put the
> par(mar=c(5.1, 7.1, 4.1, 2.1)) command between png() and plot()
> -commands.
>
> Atte
>
> > Hello,
> >
> > I have tried to change the margin widths so that mtext (here "sd of
> > consecutive pc intervals", look at the picture) and
> > plot(...,xlab="bar") fits to the picture.
> >
> > Here is an example:
> > http://users.utu.fi/attenka/margins.png
> >
> > This doesn't help:
> > par(mar=c(5.1, 7.1, 4.1, 2.1))
> >
> > And here are the commands:
> >
> > png(filename="/Users/kone/Vaitostutkimus/Pictures/
> > BachBWV60_sd_cons_pc_int.png", width = 2800, height =
> > 1200,pointsize =
> > 12, bg = "white");
> > plot(Compo_SD_succ_int_array_vector,ylim=c(0.40,1.9),col="white",xla
> > b="b ar",ylab="", cex.lab=3, cex.axis=2); mtext("sd of consecutive
> > pc intervals", side=2, line=0, padj=-1.8,at=1.2, cex=3)
> > lines(Compo_SD_succ_int_array_vector,col=1,lty=1,lwd=2);
> > text(2,0.93,labels="*",cex=3) # "an asterisk..." dev.off();
> >
> > What do I do next?
> >
> > Atte Tenkanen, Turku Finland
> >
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 19 18:48:50 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 19 Jun 2006 - 20:11:42 EST.

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