How to adjust plot size?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to adjust plot size?

liang
This post has NOT been accepted by the mailing list yet.
Greetings!

When inserting the following R curves into a word file, there is a big margin in the graph. How do I remove the marign? I tried FIN, but it seems not compatiable with MFROW.

par(mfrow=c(1,2), mar=c(10,1,10,2))
plot(1:10)
plot(1:10)

Thanks for your help,
Liang

Reply | Threaded
Open this post in threaded view
|

Re: How to adjust plot size?

Guy Green
I'm not sure what part of the process is giving you trouble, but if you play around with the "mar" part of the code, you get a lot of flexibility over the margins.  Also, if you pre-set the dimensions of the window the plot is created in, you get even more control.  E.g.

x11(width=9, height=6, pointsize=12)
par(mfrow=c(1,2), mar=c(3,2,2,2))
plot(1:10)
plot(1:10)
savePlot("c:\\test.wmf",type="wmf")


Guy

liang wrote
Greetings!

When inserting the following R curves into a word file, there is a big margin in the graph. How do I remove the marign? I tried FIN, but it seems not compatiable with MFROW.

par(mfrow=c(1,2), mar=c(10,1,10,2))
plot(1:10)
plot(1:10)

Thanks for your help,
Liang
Reply | Threaded
Open this post in threaded view
|

Re: How to adjust plot size?

liang
This post has NOT been accepted by the mailing list yet.
Hi Guy,
 
This works! Thanks a lot for the help.
 
Regards,
Liang


From: Guy Green [via R] <[hidden email]>
To: liang <[hidden email]>
Sent: Fri, June 11, 2010 3:36:56 AM
Subject: Re: How to adjust plot size?

I'm not sure what part of the process is giving you trouble, but if you play around with the "mar" part of the code, you get a lot of flexibility over the margins.  Also, if you pre-set the dimensions of the window the plot is created in, you get even more control.  E.g.

x11(width=9, height=6, pointsize=12)
par(mfrow=c(1,2), mar=c(3,2,2,2))
plot(1:10)
plot(1:10)
savePlot("c:\\test.wmf",type="wmf")


Guy

liang wrote:
Greetings!

When inserting the following R curves into a word file, there is a big margin in the graph. How do I remove the marign? I tried FIN, but it seems not compatiable with MFROW.

par(mfrow=c(1,2), mar=c(10,1,10,2))
plot(1:10)
plot(1:10)

Thanks for your help,
Liang



View message @ http://r.789695.n4.nabble.com/How-to-adjust-plot-size-tp2250904p2251588.html
To unsubscribe from How to adjust plot size?, click here.