ich steh gerade ziemlich auf de Leitung und hoffe, dass mir jemand den richtigen Tipp geben kann.
Ich habe mehrere Messdaten zu plotten und dazu einen Code geschrieben. Dieser funktioniert auch bei dem einen File, allerdings nicht bei dem zweiten.
Code: Alles auswählen
length(md$T) = 40
min(md$T,na.rm=TRUE) = -4
max(md$T,na.rm=TRUE) = 48
x_l <-length(seq(min(md$T,na.rm=TRUE), max(md$T, na.rm=TRUE))) # = 53
x <- seq(min(md$T,na.rm=TRUE), max(md$T, na.rm=TRUE),(xa_l/length(md$T)))
length(x) # =40
x_label <- c(seq(min(md$T, na.rm=TRUE), max(md$T, na.rm=TRUE), ((x_l)/length(md$T))))
length(x_label) # =40
plot(x,md$T, axes = FALSE, type = "l", col = "green",lwd=3, ylim = c(0,50))
lines(x,md$Td, type = "l", col = "blue", lwd=3)
axis(1, at = x, labels=round(x_label))
axis(2, seq(0,50,5))
Code: Alles auswählen
length(md$vv) = 127
min(md$vv,na.rm=TRUE) = 0.03
max(md$vvna.rm=TRUE) = 4.61
x_l <-length(seq(min(md$vv,na.rm=TRUE), max(md$vv, na.rm=TRUE))) # = 1
x <- seq(min(md$T,na.rm=TRUE), max(md$T, na.rm=TRUE),(xa_l/length(md$T)))
length(x) # = 117
### jetzt sind meine zwei Plot-Elemente nicht mehr gleich lange (x=117, y=127)
Ich hoffe, jemand von euch kann mir weiterhelfen.
Danke und glg.
Jessi