Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the current dimensions of the quartz device in R?

I apologize if this is too simple a question. I am relatively new to R and cannot seem to find the answer to this.

I have plotted a graph in R and saved the quartz window to a pdf. I want to reuse the same dimensions (height and width) in another graph at some later point in time. The window size is not default (I resized with my mouse). How do I get those parameters?

Thanks!

like image 713
Josh Avatar asked Mar 07 '13 14:03

Josh


1 Answers

Try using dev.size:

dev.new()
dev.size()
[1] 7.000000 6.989583
dev.new(width=3)
dev.size()
[1] 3.000000 6.989583
like image 56
James Avatar answered Sep 21 '22 14:09

James