ggsave ggpairs plot error
<p>How can I save the ggpairs as the current ggsave does not work?</p>

<p>Script:</p>

<pre><code>library(GGally)
library(ggplot2)
data(diamonds, package="ggplot2")
diamonds.samp &lt;- diamonds[sample(1:dim(diamonds)[1],200),]
pf&lt;-ggpairs(  diamonds.samp[,1:3],mapping = ggplot2::aes(color = cut))
ggsave("C:/Users/top/Desktop/ggpairs.jpg", pf, dpi=500)
</code></pre>