Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(wesanderson)
- library(ggplot2)
- library(RColorBrewer)
- library(quantmod)
- # Daten werden eingelesen
- Hendel1 <- read.table("Hendel1.txt", header = TRUE, sep = "")
- #dBergmann <- read.table("6Bergmann.txt", header = TRUE, sep = "")
- #dAnderes <- read.table("Anderes.txt", header = TRUE, sep = "")
- # Spalten 1 der Wellenlänge = z & Spalten der Intensität = i werden ausgegeben
- z01 <- Hendel1[,1]
- i01 <- Hendel1[,2]
- i02 <- Hendel1[,3]
- i03 <- Hendel1[,4]
- i04 <- Hendel1[,5]
- i05 <- Hendel1[,6]
- i06 <- Hendel1[,7]
- i07 <- Hendel1[,8]
- i08 <- Hendel1[,9]
- i09 <- Hendel1[,10]
- i10 <- Hendel1[,11]
- i11 <- Hendel1[,12]
- i12 <- Hendel1[,13]
- i13 <- Hendel1[,14]
- i14 <- Hendel1[,15]
- i15 <- Hendel1[,16]
- i16 <- Hendel1[,17]
- i17 <- Hendel1[,18]
- i18 <- Hendel1[,19]
- i19 <- Hendel1[,20]
- i20 <- Hendel1[,21]
- i21 <- Hendel1[,22]
- i22 <- Hendel1[,23]
- i23 <- Hendel1[,24]
- i24 <- Hendel1[,25]
- i25 <- Hendel1[,26]
- i26 <- Hendel1[,27]
- i27 <- Hendel1[,28]
- i28 <- Hendel1[,29]
- i29 <- Hendel1[,30]
- i30 <- Hendel1[,31]
- i31 <- Hendel1[,32]
- i32 <- Hendel1[,33]
- i33 <- Hendel1[,34]
- i34 <- Hendel1[,35]
- i35 <- Hendel1[,36]
- i36 <- Hendel1[,37]
- # Farbpalette von rot (früheste) nach blau (späteste)
- RdBu <- brewer.pal(n=9, name="RdBu")
- Greens <- brewer.pal(n=9, name="Greens")
- PuRd <- brewer.pal(n=9, name="PuRd")
- Blues <- brewer.pal(n=9, name="Blues")
- # plot: x-Achse & y-Achse entsteht
- # points: Spektren entstehen
- plot(z01, i01, type = "l", lwd=1, col=RdBu[1], main = "Proband Hendel", xlab="Wellenlänge in nm", ylab = "Intensität")
- points(z01, i02, type = "l", lwd=1, col=RdBu[2])
- points(z01, i03, type = "l", lwd=1, col=RdBu[3])
- points(z01, i04, type = "l", lwd=1, col=RdBu[4])
- points(z01, i05, type = "l", lwd=1, col=RdBu[5])
- points(z01, i06, type = "l", lwd=1, col=RdBu[6])
- points(z01, i07, type = "l", lwd=1, col=RdBu[7])
- points(z01, i08, type = "l", lwd=1, col=RdBu[8])
- #points(z01, i09, type = "l", lwd=1, col=RdBu[9])
- #points(z01, i10, type = "l", lwd=1, col=Greens[1])
- #points(z01, i11, type = "l", lwd=1, col=Greens[2])
- #points(z01, i12, type = "l", lwd=1, col=Greens[3])
- #points(z01, i13, type = "l", lwd=1, col=Greens[4])
- #points(z01, i14, type = "l", lwd=1, col=Greens[5])
- #points(z01, i15, type = "l", lwd=1, col=Greens[6])
- #points(z01, i16, type = "l", lwd=1, col=Greens[7])
- #points(z01, i17, type = "l", lwd=1, col=Greens[8])
- #points(z01, i18, type = "l", lwd=1, col=Greens[9])
- #points(z01, i19, type = "l", lwd=1, col=PuRd[1])
- #points(z01, i20, type = "l", lwd=1, col=PuRd[2])
- #points(z01, i21, type = "l", lwd=1, col=PuRd[3])
- #points(z01, i22, type = "l", lwd=1, col=PuRd[4])
- #points(z01, i23, type = "l", lwd=1, col=PuRd[5])
- #points(z01, i24, type = "l", lwd=1, col=PuRd[6])
- #points(z01, i25, type = "l", lwd=1, col=PuRd[7])
- #points(z01, i26, type = "l", lwd=1, col=PuRd[8])
- #points(z01, i27, type = "l", lwd=1, col=PuRd[9])
- #p#oints(z01, i28, type = "l", lwd=1, col=Blues[1])
- #points(z01, i29, type = "l", lwd=1, col=Blues[2])
- #points(z01, i30, type = "l", lwd=1, col=Blues[3])
- #points(z01, i31, type = "l", lwd=1, col=Blues[4])
- #points(z01, i32, type = "l", lwd=1, col=Blues[5])
- #points(z01, i33, type = "l", lwd=1, col=Blues[6])
- points(z01, i34, type = "l", lwd=1, col=Blues[7])
- points(z01, i35, type = "l", lwd=1, col=Blues[8])
- points(z01, i36, type = "l", lwd=1, col=Blues[9])
- #p01 <- findPeaks(i06, thresh = 500)
- #points(p06/ 250, i06[p06], pch=20, col=RdBu[1], cex = 2)
- #closeAllConnections()
- #rm(list=ls())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement