# Show parameters on graph

I am graphing the 4 PDFs for a distribution for 4 different parameters in the same graph. I want the values of the parameters to be shown in corner of the graph. How do I do this?

-
You can use Text[], among other things. However, it would be nice if you could show a picture of what you're expecting to see from us... – J. M. May 4 '12 at 3:25
Something like this: upload.wikimedia.org/wikipedia/commons/thumb/e/ec/… – Chris May 4 '12 at 3:32
Oh, you want a legend. That's slightly tricky business, and it has been discussed a number of times before here. Have a look at these. – J. M. May 4 '12 at 3:49
Although I answered the question, I realize this is a duplicate of Creating legends for plots with multiple lines? - so it's justified to close this, I think. – Jens May 4 '12 at 4:20

## 1 Answer

The following is what you get using the code posted in my answer linked here:

All you have to do is make the plot, and call the function autoLegend I defined in the link:

styles = {Black, Directive[Dashed, Black],
Directive[DotDashed, Black], Directive[Dotted, Black]}
parameters = {1/2, 1/3, 1/5, 1/1000};
p = Plot[Evaluate[
PDF[ExponentialDistribution[#]][x] & /@ parameters], {x, 0, 50},
AxesOrigin -> {0, 0}, PlotStyle -> styles];
autoLegend[p, parameters]


-
So cool, thanks alot! :) – Chris May 4 '12 at 5:13