I have the following data:
setA = {
{875, 0.399483},
{880, 0.391583},
{885, 0.383609}};
setB = {
{645, 0.690354},
{650, 0.685416},
{655, 0.680413}};
I'm trying to plot the data from both sets on the same plot. I can do the following:
var[set_,col_] := set[[All, col]];
setAx = var[setA,1]; setAy = var[setA,2];
setBx = var[setB,1]; setBy = var[setB,2];
then plot:
valplot[var1_, var2_, opts_] :=
ListPlot[Transpose[{var1, var2}], PlotRange -> All,
PlotStyle -> {Red}, Joined -> False, opts]
setsAandBPlots = GraphicsGrid[{
{setAyPlot = valplot[setAx, setAy, AxesLabel -> {"variable x", "variable y"}]}
(* ,etc... *)
}, ImageSize -> 300]
This is pretty clunky, I know (i'm very new to programming - and i'm starting with mathematica...).
I want to make a series of these plots comparing different sets (and the actual datasets i'm using are much larger than these - many more rows and columns)
I would like to be able plot multiple subsets (e.g. "(setAx and setbx) versus (setAy and SetBy)", etc...) on the same plots (defined by different colored markers) using something like "Show". There must be a neat(er) way to do it using, say, "Position" and "Intersection" to pick the individual values for plotting.
I guess I'm asking if any one can help me find a more general/programatic way to populate the lists "setAx, setAy,setBx, etc..." without having to write them out long-hand?
Cheers!
EDIT:
Sorry I oversimplified my data. It looks more like this:
setA = {{8.0, 830, 0.466626, 1.720689,0.200740, 0.018637, 0.009023, 0.029482, 0.091949, 0.074304, 0, 0},
{8.0, 835, 0.459588, 1.742870, 0.202380, 0.019201, 0.010261, 0.032965, 0.093269, 0.074717, 0, 0}};
setB = {{8.0, 845, 0.445114, 1.787952, 0.205660, 0.020367, 0.013240, 0.041201, 0.095895, 0.075504, 0, 0},
{8.0, 850, 0.437659, 1.810861, 0.207301, 0.020968, 0.015022, 0.046038, 0.097197, 0.075877, 0, 0}};
so, the data is essentially of the form {{A1x, A1y, A1z,…},{A2x,…}}; {{B1x, B1y, B1z,…},{B2x,…}};.
I'd like to be able to plot various combinations with axes: x vs. z, y vs. z etc. ListPlot alone won't help me do this... hence the use of new lists of the form Transpose[{Ax, Az}] etc..
{x, y1, y2, ...}
? $\endgroup$ListPlot[{setA, setB}]
work for you ? $\endgroup$