Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- texto <- 'Animal Time Consumo
- 5 1 2.53396
- 5 2 2.32906
- 5 3 2.94379
- 5 4 3.36162
- 6 1 2.89082
- 6 2 2.53898
- 6 3 2.97881
- 6 4 3.03876
- 7 1 2.81885
- 7 2 2.73889
- 7 3 2.67891
- 7 4 2.87885'
- Consumo <- read.table(text = texto, header = TRUE)
- Consumo$Animal <- factor(Consumo$Animal)
- Consumo$especial <- ifelse(Consumo$Animal == '7', 'especial', 'normal')
- library(ggplot2)
- gg1 <- ggplot(data = Consumo, aes(x = Time, y = Consumo, colours=Animal)) +
- geom_line(aes(color = especial))
- gg1
- gg2 <- gg1 +
- scale_color_manual(values = c(especial = 'red', normal = 'grey')) +
- guides(colour = 'none')
- gg2
- gg2 + xlab("Time, d") +
- ylab("Forecast daily feed intake,kg") +
- theme_bw() +
- labs(title = "C: Current model") +
- theme(plot.title = element_text(face = "bold", size = 18, hjust = 0),
- axis.title = element_text(size = 18),
- axis.text = element_text(size = 14))
Add Comment
Please, Sign In to add comment