# Recursively plotting specific elements in a list of lists

I am trying to build band structures and am looking to generate a general code that will work regardless of my list size. Here is what I am trying to do: say I have a list like

list = {{0.0, 1, 2, 3}, {0.1, 4, 5, 6}, {0.2, 7, 8, 9}, {0.3, 10, 11, 12}};


and I want to plot the nth element of each list against the first element of each list. How can I tell Mathematica to automatically produce a set of lists to plot like shown below

k = {0.0, 0.1, 0.2, 0.3};
band1 = {1, 4, 7, 10};
band2 = {2, 5, 8, 11};
band3 = {3, 6, 9, 12};
Show[ListLinePlot[k, band1], ListLinePlot[k, band2], ListLinePlot[k, band3]]


Doing it manually one band at a time is possible but a waste of time when I have n=36+ bands. Any help would be much appreciated!

• E.g. band[k_]=(Transpose@list)[[k-1]] Sep 12 '20 at 14:28

Clear["Global*"]

plot[list_?MatrixQ] := Module[
{k = list[[All, 1]],
bands = Transpose[list[[All, 2 ;;]]]},
ListLinePlot[Transpose[{k, #}] & /@ bands,
PlotLegends -> Range[Length[bands]],
AxesLabel -> {"k", "bands"}]]

list = {{0.0, 1, 2, 3}, {0.1, 4, 5, 6}, {0.2, 7, 8, 9}, {0.3, 10, 11, 12}};

plot[list]
` • Perfect! Many thanks :) Sep 12 '20 at 15:13