Created
May 22, 2015 03:59
-
-
Save arbennett/8e18574d5d48a1f0d809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
# Attempt at a somewhat complicated plot layout | |
# @author arbennett | |
dataset_1 <- rnorm(10) | |
dataset_2 <- rnorm(10) | |
dataset_3 <- rnorm(10) | |
dataset_4 <- rnorm(10) | |
layout(matrix(c(1,2,3,4,5,5), ncol=2, byrow=TRUE), heights=c(4, 4)) | |
par(mai=rep(0.5, 4)) | |
plot(dataset_1,main="plot 1", col="green") | |
plot(dataset_2,main="plot 2", col="orange") | |
plot(dataset_4,main="plot 4", col="red") | |
plot(dataset_3,main="plot 3", col="blue") | |
par(mai=c(0,0,0,0)) | |
plot.new() | |
legend(x="center", ncol=3,legend=c("dataset_1","dataset_2","dataset_3", "dataset_4"), | |
fill=c("green","orange","red", "blue"), title="Fetch") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment