I am attaching an example of an interactive plot, where I want the user to be able to fix the dimensions of the plot (here in inches) to make it legible depending on their device. In this minimal example, the numericInput allows you to set the height in inches and the output is a simple line plot. I have tried adjusting the plot size in chunk options (fig,width, out.width), by setting par(fin), and by specifying 'non-auto' dimensions in the call to renderPlot() call. As you will see, the 'plot region too large' error is returned whenever the plot size is increased beyond 5.6".
In RStudio, this error can be dismissed by adjusting the size of the plot window (which feeds back through par("fin") or par("din") I think, but that's obviously not an option in interactive markdown. I was wondering if I need to over-ride the dev.size() option, but I wasn't clear if that made sense or how exactly to do it for the browser window. Does anyone have an approach that works?
————————————————
Atul Sharma MD, MSc, FRCPC
Assistant Professor,
Department of Pediatrics and Child Health,
Pediatric Nephrology