# Map inside LogLinearPlot with legends and different colors [closed]

I have been trying to use Plot with a nested map to make plots of a numerically integrated function with different argument parameters, and after some searching I have finally got that sorted. My MWE looks like this:

colors = (("DefaultPlotStyle" /. (Method /.
ChartingResolvePlotTheme["Default", ListLinePlot])) /.
Directive[x_, __] :> x);
f[x_, y_] := y Sin[y Log[x]]
Plot[Map[f[l, #]/l &, {0.05, 0.1, 0.2}], {l, 0, 100}, Evaluated -> True,
PlotStyle -> colors, Frame -> True,
FrameLabel -> {"x", "f", "f=y Sin(y ln(x))"},
PlotLegends -> LineLegend[colors, {"y=0.05", "y=0.1", "y=0.02"}]]


Which works beautifully, but now I want to plot something in the same way but with a logarithmically scaled x-axis. LogLinearPlot obviously does this but doesn't accept an "Evaluated" argument, and I can't figure out how to get the lines to all have a different color.

Is there a method which does this and is portable across all incarnations of *Plot function?

## closed as off-topic by MarcoB, dr.blochwave, C. E., m_goldberg, Bob HanlonSep 4 '15 at 4:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, dr.blochwave, C. E., m_goldberg, Bob Hanlon
If this question can be reworded to fit the rules in the help center, please edit the question.

• Wrap the first argument of your plot in Evaluate, i.e. Evaluate[Map[...]], or equivalently Evaluate@Map[...]. You will also want to change the range for the l variable so it doesn't include $0$ for a logarithmic plot. – MarcoB Sep 3 '15 at 16:01
• Nope... That breaks things completely and I get an empty graph – PTooley Sep 3 '15 at 16:25
• LogLinearPlot[#, <options>] & @ Map[f[l, #]/l &, {0.05, 0.1, 0.2}] – march Sep 3 '15 at 16:31
• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Sep 3 '15 at 16:39
• @telemin Did you remove the Evaluated option though? I posted what I see below as an answer, with the addition of Evaluate and the change in plotting domain to accommodate the logarithmic axes. – MarcoB Sep 3 '15 at 17:03

colors =
(("DefaultPlotStyle" /.
(Method /. ChartingResolvePlotTheme["Default", ListLinePlot])) /.
Directive[x_, __] :> x);
f[x_, y_] := y Sin[y Log[x]]

LogLinearPlot[
Evaluate @ Map[f[l, #]/l &, {0.05, 0.1, 0.2}], {l, 1, 100},
(*notice the removal of zero, which won't work in LogPlot*)
PlotStyle -> colors, Frame -> True,
FrameLabel -> {"x", "f", "f=y Sin(y ln(x))"},
PlotLegends -> LineLegend[colors, {"y=0.05", "y=0.1", "y=0.02"}]
]