Created
January 5, 2017 14:28
-
-
Save pintowar/31a1b59855bc4e2e81dcc34a624911a2 to your computer and use it in GitHub Desktop.
Series of line plots in R
This file contains hidden or 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
| data <- read.csv('data.csv', sep=',') | |
| subplot <- function(data, set) { | |
| subdata <- subset(data, column == set) | |
| xrange <- strptime(subdata$period, format='%H:%M:%S') | |
| yrange <- subdata$fitness | |
| plot(xrange, yrange, type="l", col="blue", xlab="Period", ylab="Fitness", main="Evolution") | |
| } | |
| setplot <- function(data, range) { | |
| par(mfrow=c(2,5)) | |
| for(i in 1:10) { | |
| subplot(data, i) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment