Individually labeling plots generated by Map

This question already has an answer here:

  • Different results with Plot option “Evaluated” in V9 and V10 2 answers

I understand that this has been asked before, but none of the solutions are working for me:

I'm plotting a function for many different values of a variable, z, using Map. I have the Evaluate->True tag, and my plots are appearing as different colors, but try as I might I can't seem to get the labels for more than the first line.

Here is what I have:

zlist = Table[z, {z, zmin, zmax, zincrement}]  Plot[Map[function[x, #] & , zlist], {x, 1, 10},   Evaluated -> True, PlotLegends -> zlist] 

It generates the expected plot with each line in a different color, but with only one label! This shouldn't be happening as far as I have been able to determine. Not sure what's going on.

edit - i've been linked to a solution: If you manually wrap the Map function in Evaluate[], rather than using Evaluate->True, it works. Feels like a bug, but just in case anyone runs into it that's a simple workaround.

Replay

I'm not sure why it's happening, but replacing the Evaluated->True with Evaluate in front of your Map fixes the situation:

zlist = {1, 2, 3};
Plot[[email protected][Sin[x #] &, zlist], {x, 1, 10}, PlotLegends -> zlist]

Individually labeling plots generated by Map

Category: plotting Time: 2016-07-29 Views: 0
Tags: plotting

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.138 (s). 12 q(s)