In this question it says my current question was answered by this question; however the code suggested doesn't go far enough for me. These charts need to be suitable for scientific publication, so the effect of yaxs = "i"
and xaxs = "i"
is not suitable for what I need to produce.
The charts displayed in the second link look great, and would be up to the job that I am after, however when I use a similar code for data that does not start at 0:
matplot(times, cbind(a, b, c),
pch = 1,
col = c("red", "blue", "green"),
lty = c(1, 1, 1),
xlab = "Time (s)",
ylab = "Flourescense Yield (RFU)",
main = "test",
xlim = c(0 , max(times)),
ylim = c(min(a, b, c) - 0.1* min(a, b, c), max(a, b, c) + 0.1* max(a, b, c)),
axes = FALSE)
axis(1, pos = 0, at = 0: round(times))
axis(2, pos = 0, at = round(min(a, b, c)): round(max(a, b, c)))
legend("topright", y =NULL, c("Biocomposite 1", "Biocomposite 2", "Biocomposite 3"),
text.col = c("red", "blue", "green"))
I get the following chart:
I have simplified the code so I don't use my actual data, and I am using the following objects:
a <- sample(1:100, 10, replace = TRUE)
b <- sample(1:100, 10, replace = TRUE)
c <- sample(1:100, 10, replace = TRUE)
times <- c(0:9)
What I would like is to have the axes to cross at (0,6), and horizontal tick points to increment in multiples of 5.
Any help with sorting this would be great!