18 mar. 2013

Generating PDF docs with "R"

It is really amazing how while you are reading papers, bibliography,...., from the R community, how you can apply all these knowledge´s to your work in order to prepare nice documents.
In this plot you can see the spectra from sunflower seed without any treatment in the first column, and treated with MSC in the second (to remove scatter).

This plot has been generated in a PDF document with the script:

pdf("fig-1-1.pdf",width=9,height=7)
par(mfrow=c(3,2),mar=c(4,4,3,3))


Now we add all the plot script:

matplot(wave.ALL,t(ALL),type="l",lty=1,xlab="nm",
      ylab="log 1/R",col="blue",main="Sunflower RAW Spectra")

matplot(wave.VIS,t(VIS),type="l",lty=1,xlab="nm",
      ylab="log 1/R",col="blue",main="Sunflower RAW Spectra")
matplot(wave.NIR,t(NIR),type="l",lty=1,xlab="nm",
        ylab="log 1/R",col="blue",main="Sunflower RAW Spectra")
matplot(wave.ALL,t(ALLmsc),type="l",lty=1,xlab="nm",
ylab="log 1/R",col="blue",main="SFLW Spec MSC")

matplot(wave.VIS,t(VISmsc),type="l",lty=1,xlab="nm",
        ylab="log 1/R",col="blue",main="VIS segment SFLW Spec with MSC")
matplot(wave.NIR,t(NIRmsc),type="l",lty=1,xlab="nm",
        ylab="log 1/R",col="blue",main="NIR segment SFLW Spec with MSC")


and we finish with:

dev.off()

I use in this case for the documents the same settings than

No hay comentarios:

Publicar un comentario