I am trying to compare nutrient element values (N, P, K, etc.) from several trials, using the stripplot()
plotting function. I want to see the individual values side by side for each nutrient, not in separate plots for each trial, so that readily-available comparisons can be made within each nutrient (for example, comparing nitrogen (N) values from "Trial A" to nitrogen values from "Trial B"). This code makes side by side plots, which are not easily-comparable between Trials:
foo <- data.frame(conc=rnorm(90),element=rep(c("N","P","K"),each=30),
trial=rep(c("Trial_A","Trial_B"),times=45))
stripplot(conc~element|trial,data=foo)
Is there a way to intersperse the nutrient values so that there is just one big stripplot, and then eventually I would just use plotting symbols (pch=
) to delineate trials?
@ BlankUsername: I greatly appreciate the code suggestion. However, I am actually trying to plot the values side by side in separate "columns" of points... So in this case, for N, P, and K from 2 trials, along the x-axis I would have, in this order: N from Trial 1, N from Trial 2, P from trial 1, P from Trial 2, K from Trial 1, K from Trial 2... So, for 3 nutrients and 2 trials I would have 2x3 = 6 "columns" of values, not 3 columns where the values are combined for both trials and delineated with symbols. I hope this description makes sense. I would include a picture of the plot that I am trying to make if I could make it, but then I would already have the answer to this question I guess :) The reason that I'd like to do it this way is because I have many nutrients with many values for each trial, and yes, it gets a bit unwieldy when they are all plotted on top of one another and I am trying to distinguish the symbols!