16
XCMS / Question regarding the plot-methods {MSnbase}, type = "XIC"
after having get acquainted with xcms, i.e. rather MSnbase, here specifically with regard to the wonderful plotting functions (plot-methods {MSnbase}) available in MSnbase, a question came up, which I am not able to solve by myself...
More specifically, I am referring to this adopted demo code available from:
plot-methods {MSnbase} - R Documentation
Plotting 'MSnExp' and 'Spectrum' object(s)
I am using R.3.5.3 under Windows7 with packageVersion("MSnbase") ‘2.8.3’ and packageVersion("xcms") ‘3.4.4’.
Here is the demo code (last 2 lines adopted):
## Load profile-mode LC-MS files
library(msdata)
od <- readMSData(dir(system.file("sciex", package = "msdata"),
full.names = TRUE), mode = "onDisk")
## Restrict the MS data to signal for serine
serine <- filterMz(filterRt(od, rt = c(175, 190)), mz = c(106.04, 106.06))
plot(serine, type = "XIC")
abline(v = 181.0, col = "red", lty = 2)
abline(h = 106.05, col = "red", lty = 2)
The question is: why are the two lines (vertival and horizontal) only drawn for the last sample and not for all samples?
I think this is related to the underling layout function used in this plot, i.e. plot(..., type = "XIC"), but I am not able to solve the problem by myself...
thanks
Tony