I just combined two lists using this method
molefrac = {1., 0.787402, 0.478927, 0.282592, 0.}
calibrationIndexOfRefraction = {1.440, 1.421, 1.395, 1.380, 1.351}
Partition[Riffle[molefrac, calibrationIndexOfRefraction], 2]
{{1., 1.44}, {0.787402, 1.421}, {0.478927, 1.395}, {0.282592, 1.38}, {0., 1.351}}
The purpose of this was to prepare the lists to be plotted using ListPlot
. Is there some way to use ListPlot
directly (or something more functional) to do this without going through all the extra steps?
molefrac
? And why do you have so many and btw unbalanced parenthesis in the 1st line? $\endgroup$newList = Transpose[{molefrac, calibrationIndexOfRefraction}]
. You will get the same result as above on a more straightforward way. This can be plotted easily withListPlot[newList]
. Or do I misunderstand your question? $\endgroup$