0

I have several monitors and I want to display in full screen certain plots on specified monitors.

This could be done by hand, but I wonder if it can be coded in R?

Ideally, something like:

 monitor(2) #define monitor 2 as the space where graphic devices will be drawn
 windows ("maximized") #create empty graphic device maximized to the screen/monitor
 plot (0) # do plot.

There are two interrelated questions this problem:

1: How can one find the maximum dimensions of a monitor in R? I found a solution of 11 years ago here, but I get a zero value in return. Currently, I am creating a new graphic Window, then maximize it by hand (by clicking on the "Maximize bottom" at the top right hand of the window), then getting the size in inches with the dev.size("in"), and then using those values in new graphic windows. Is there an easy way to create graphic windows in full screen?

windows()  #step 1 and 2 ; create new window, then maximize it by hand
dev.size(units = "in") #find dimension of largest possible window in inches
windows(11.25000,19.13542) #create graphic device of given size
windows(11.25000,19.13542) #create second graphic device of given size
  1. How can we control the monitor on which a given window is drawn?. A similar question was formulated 10 years ago, but there was not response at the time. Over that many years, has this changed?
Camilo
  • 153
  • 7
  • The displayed dimensions of a plot window are controlled by you, not by R. I don't use RStudio, so for me I just use the "max" button in the title bar of the plot window; in RStudio, it's different, their docs talk about how to move the graphics pane around and resize it. When I want multiple plots open and optionally on different monitors, then I use `dev.new()` for as many new windows as I need, then use `dev.set(3)` or whichever number to plot to that window next (typically the title bar of the plot window has its number, and ACTIVE or INACTIVE). – r2evans Mar 20 '22 at 04:00
  • You can actually control the size of the new Window using the function window followed by the width and length you want...it is still restricted to at least ~85% of the maximum display for some default reason. – Camilo Mar 20 '22 at 18:07

0 Answers0