I want to plot following function in Mathematica:

$f(x) = \frac{x}{x+c}$

I used the following command.

ListPlot[x/(x+c), {c, 1,10}, {x, 0, 10, 0.1}]

But it does not give me legends like which plot belongs to which value of c. Need help ASAP.


closed as off-topic by Sascha, Sjoerd C. de Vries, Bob Hanlon, happy fish, J. M. is away Apr 23 '17 at 12:54

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." – Sascha, Sjoerd C. de Vries, Bob Hanlon, happy fish, J. M. is away
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Use Plot3D[x/(x+c),{c,1,10},{x,0,10}] or if you want to plot your function multiple times for different c, use Plot[Evaluate@Table[x/(x+c),{c,1,10}],{x,0,10}] $\endgroup$ – Julien Kluge Apr 23 '17 at 10:26
  • $\begingroup$ @JulienKluge: What i wrote does the trick but I want mathematica to show me which plot corresponds to which value of c. $\endgroup$ – Monty Apr 23 '17 at 10:37
  • 4
    $\begingroup$ See my answer. And no, your given code isn't even valid MMA code. $\endgroup$ – Julien Kluge Apr 23 '17 at 10:40

You should really use Plot


evaluates to:

enter image description here




Evaluates to your functions, for the given Range of c.




Evaluate forces Mathematica to evaluate the Table-expression. This must be done, because Plot holds its arguments. See here.



Is an option for Plot and says Mathematica, that it should use the function-expressions as PlotLegends.


Not the answer you're looking for? Browse other questions tagged or ask your own question.