1

I was expecting

Plot[{Sin[x], Cos[x]}, {x, -1, 1}, PlotLabels -> Automatic]

and

Plot[Through[{Sin, Cos}[x]], {x, -1, 1}, PlotLabels -> Automatic]

to give the same result, as

Through[{Sin, Cos}[x]]

gives

{Sin[x], Cos[x]}

However I get this two different plots:

plot 1 plot 2

Is it a bug or do I misunderstand something? (maybe HoldAll Plot[] attribute does not mix well with Through[])

(I am running under Linux with MMA version 11.2.0 for Linux x86 (64-bit) (September 11, 2017))

Picaud Vincent
  • 2,463
  • 13
  • 20

1 Answers1

3

Try with Evaluate

Plot[Through[{Sin, Cos}[x]] // Evaluate, {x, -1, 1},PlotLabels -> Automatic]

enter image description here

Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55