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?


1 Answer 1


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]


  • $\begingroup$ So cool, thanks alot! :) $\endgroup$
    – Chris
    May 4, 2012 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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