QuantumBinary
QuantumBinary

Reputation: 31

Show plots with R in jupyter: windows() function crashing

I use R in jupyter with IRkernel. I want to get a resizable window with the plots since jupyter shows plots in a fixed size.

With RStudio, I used the windows() function before plotting. However, with jupyter a window opens but it is not responding (I have to kill it in task manager).

Is there a workaround or another function to use?

Upvotes: 1

Views: 66

Answers (1)

QuantumBinary
QuantumBinary

Reputation: 31

So the solution is to use repr.plot.width, repr.plot.height and repr.plot.res. However, I needed to use a lot bigger values (5/10/15) to avoid the invalid graphics state error.

For example, options(repr.plot.width=10, repr.plot.height=10, repr.plot.res=500)

Upvotes: 1

Related Questions