Josh
Josh

Reputation: 53

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!

Upvotes: 5

Views: 3016

Answers (1)

James
James

Reputation: 66844

Try using dev.size:

dev.new()
dev.size()
[1] 7.000000 6.989583
dev.new(width=3)
dev.size()
[1] 3.000000 6.989583

Upvotes: 6

Related Questions