0
grafico <- read.csv("Pasta1.csv", header = F, sep = ";")
library(ggplot2)
Experimental <- ggplot(grafico)+
geom_line(size=1.2, aes(x=V1, y=V2))+
scale_fill_manual(values = c("Experimental" = "green", "nulo" = "null"))
angulo30 <- Experimental+
geom_line(size=1, col="blue", aes(x=V3, y=V4))
angulo36 <- plot30+
geom_line(size=1, col="red", aes(x=V5, y=V6))
angulo42 <- plot36+
geom_line(size=1, col="green", aes(x=V7, y=V8)) +
labs(x="Displacement (mm)", y="Load (kN)")+
theme_bw(base_size = 12)+
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())+
theme(axis.text.x = element_text(color = "black", size = 12), axis.text.y = element_text(color = "black", size = 12))
angulo42
Welcome to Stackoverflow! Unfortunately, this question cannot be reproduced by anyone trying to answer it. Please take a look at this link (mainly in the use of function
dput
) and see how to ask a reproducible question in R. So, people who wish to help you will be able to do this in the best possible way.– Marcus Nunes
Hello Paul. You need to put
color
insideaes
. Check these posts: https://answall.com/questions/41503/como-colocarlegenda-em-graficos-de-distribui%C3%A7%C3%b5es-no-ggplot e https://answall.com/questions/363454/legenda-no-gg-plotn%C3%a3o-aparece– Carlos Eduardo Lagosta
Thanks, @Carloseduardolagosta! I got it!
– Paulo Victor
I am happy. If it was the other posts that helped you solve, I recommend deleting your question, so there is no duplication within the OS.
– Carlos Eduardo Lagosta