Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change plot size of pairs plot in R

Tags:

r

I have this pairs plot

enter image description here

I want to make this plot bigger, but I don't know how.

I've tried

window.options(width = 800, height = 800)

But nothing changes.

Why?

like image 463
praks5432 Avatar asked Nov 02 '22 03:11

praks5432


2 Answers

That thing's huge. I would send it to a pdf.

> pdf(file = "yourPlots.pdf")
> plot(...)  # your plot
> dev.off()  # important!

Also, there is an answer to the window sizing issue in this post.

like image 195
Rich Scriven Avatar answered Nov 13 '22 02:11

Rich Scriven


If your goal is to explore the pairwise relationships between your variables, you could consider using the shiny interface from the pairsD3 R package, which provides a way to interact with (potentially large) scatter plot matrices by selecting a few variables at a time.

An example with the iris data set:

install.packages("pairsD3")
require("pairsD3")
shinypairs(iris)

More reference here

like image 33
Garth Avatar answered Nov 13 '22 04:11

Garth