-1
Hello,
I’m trying to make a graph on lines and error bars, but the errors are being plotted over the first line, and not on the second.... and my legend is not being printed. Could you see what is wrong? Follows the code:
V_drone = c(.5, 1.0, 1.5, 2.0, 2.5, 3.0)
Tempo_Incremental_Antigo = c(2589.9, 1905.6, 1567, 1324.5, 1218.6,1119)
Tempo_Incremental_Novo = c(2455.5, 1678.5,1370.8,1147.6, 996.59,911);
Tempo_error_A = c(52.35233201, 87.73976673,88.0883395,49.61566573,192.8685591,50.74248713)
Tempo_error_N = c(46.04164781,56.39592184,75.66563876,64.87500803,161.2008043,75.55329245)
plot(V_drone,Tempo_Incremental_Antigo, ylab=expression("Overall Time(s)"),xlab=expression("Drone speed(m/s)"),col="blue", pch=15, ylim=c(0,3500), cex=1.3, type="b")
arrows(V_drone,Tempo_Incremental_Antigo, V_drone, Tempo + Tempo_error_A, length=0.1,angle = 90,col="blue")
arrows(V_drone,Tempo_Incremental_Antigo, V_drone, Tempo - Tempo_error_A, length=0.1,angle = 90,col="blue")
points(V_drone,Tempo_Incremental_Novo, ylab=expression("Overall Time(s)"), pch=15, ylim=c(0,3500), cex=1.3, type="b", col="red")
arrows(V_drone,Tempo_Incremental_Novo, V_drone, Tempo + Tempo_error_N, length=0.1,angle = 90, col="red")
arrows(V_drone,Tempo_Incremental_Novo, V_drone, Tempo - Tempo_error_N, length=0.1,angle = 90, col="red")
legend(20,30,legend=c("Fotossínte", "Condutância estomática"),pch=c(15,16),bty="n")
text(5,30,"Gráfico A")