1
$\begingroup$

I have data stored in a nested list and I have to plot them. I have something like this

Table[DiscretePlot[Data[[m, n]], {n, 1, 2100}],{m, 3, 48, 6}]

Data is just a list of many sublists and I have to plot just some of them. For every plot I have to add a label like $t=100$ but the labels have to be different for each plot. Can anyone help me with this?

$\endgroup$
  • 1
    $\begingroup$ It would be helpful to know more precisely how your "Data" is structured. Can you provide an abbreviated sample, say, a couple of lines? $\endgroup$ – TransferOrbit Oct 20 '16 at 9:04
  • $\begingroup$ It is a really huge amount of data. The structure is the following Data={{},........,{}} There are 48 sublists, and each list is made out of many numbers (4000 elements) $\endgroup$ – Ferrarista Oct 20 '16 at 9:16
1
$\begingroup$
Data = RandomReal[1, {3, 10}];

labels = {100, 200, 300};

Table[DiscretePlot[Data[[m, n]], {n, 1, 8}, 
  PlotLabel -> "Label: t=" <> ToString @ labels[[m]]], {m, 1, 3}]

enter image description here

$\endgroup$
0
$\begingroup$
data = RandomReal[1, {48, 2100}];
labels = Table[Row[{"Label: t=", 100 t}], {t, 3, 48, 6}]; 

Labeled[DiscretePlot[#[[n]], {n, 1, 2100}], #2, Top] & @@@
  Transpose[{data[[Range[3, 48, 6]]], labels}]

or

DiscretePlot[#[[n]], {n, 1, 2100}, PlotLabel -> #2] & @@@ 
 Transpose[{data[[Range[3, 48, 6]]], labels}]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.