I noticed the following strange behaviour:
Let us first define an array of functions
g[k_] := {Sin[k], 2*Sin[k]}
gg = g[k]
When I plot this array of functions with
DiscretePlot[{Sin[k], 2 Sin[k]}, {k, 1, 50}]
each of the two sets of points have a different colour. But, both
DiscretePlot[gg, {k, 1, 50}]
and
DiscretePlot[g[k], {k, 1, 50}]
show the two sets of points in blue.
I am more interested in the second case, because should the array of functions be large, it is more comfortable to use the definitions like g and gg given above. But I want to preserve the different colours. How do I do that?
DiscretePlot[Evaluate@gg, {k, 1, 50}]andDiscretePlot[Evaluate@g[k], {k, 1, 50}]? – kglr Jun 27 '14 at 18:34Evaluatesolves the problem. – altroware Jun 28 '14 at 00:58