Specifying Options when using Map abbreviated form (“/@”) [closed]

I want to make /@ with some option, Like PlotRange->All

f={{{2, 12, 21, 139, 130, 138, 128, 18, 11, 1}}, {{0, 8, 24, 126, 152,
132, 120, 24, 8, 1}}, {{3, 4, 12, 60, 142, 291, 68, 12, 2,
3}}, {{1, 4, 14, 83, 173, 209, 94, 13, 6, 1}}, {{10, 21, 46, 125,
95, 102, 107, 40, 22, 15}}, {{9, 24, 31, 95, 113, 150, 105, 26, 24,
6}}, {{3, 4, 15, 96, 138, 231, 90, 10, 10, 0}}, {{23, 49, 38, 86,
43, 32, 60, 37, 41, 33}}};
Show[ListLinePlot /@ f]

I would like to change the plot Range, or give some plot legends. Is there a way I can do it all by one command?

=================

=================

1 Answer
1

=================

You could do

Show[ListLinePlot[#, PlotRange -> All] & /@ f]

but the PlotRange of the final plot is still controlled by the first argument to Show. This works,

Show[ListLinePlot[#, PlotRange -> MinMax@f] & /@ f]

But as Chip Hurst points out, the smart way to get the same plot is Show[ListLinePlot /@ f, PlotRange -> All]

In this case, I think you get a better plot via

ListLinePlot[Flatten[f, 1], PlotRange -> All]

  

 

Thank you so much, it is really helpful!
– Saesun Kim
Mar 8 at 16:19

  

 

@JasonB For your first two solutions, why not place PlotRange inside Show? Show[ListLinePlot /@ f, PlotRange -> All]
– Chip Hurst
Mar 8 at 16:25

1

 

@ChipHurst, um, because I am not a smart man
– JasonB
Mar 8 at 16:27

1

 

Perhaps use With[{minmax = MinMax@f}, …] so that you’re not recomputing the min-max each time (depending on what f is, it could be non-trivial)
– R. M.♦
Mar 8 at 16:32