Dear All
I'm new to this forum, so apologies if this is the wrong place for my question and/or it's been asked before.
I'm using Mathematica 9, and I'm having some trouble with the ListPlot function. For example, say I execute this code:
data1 = {0.1, 0.4, 0.3}; ListPlot[data1, Joined -> True]
then I get a nice little plot in my notebook. But say I execute this code instead:
data1 = {0.1, 0.4, 0.3}; ListPlot[data1, Joined -> True]; data2 = {0.2, 0.3, 0.4}; ListPlot[data2, Joined -> True]
then it only gives me the second plot (i.e. data2), rather than the two plots (i.e. data1 & data2).
In previous versions of Mathematica (version 5, perhaps?), this code would have returned two plots (or, rather, it would if I used PlotJoined rather than Joined).
The context is that I want to use a single line of code, with a Do function, to return several plots of data, each dataset being generated by a separate iteration of the Do function. But even something as simple as:
data = {0.1, 0.4, 0.3}; Do[ListPlot[data, Joined -> True], {10}]
is not doing what I want it to.
I'd be grateful for any advice on this issue.
Best wishes
Andy