0
$\begingroup$

When we plot many curves, due to repeated colors it becomes difficult to discern that which curve belongs to which equation.

For instance,

Plot[{n!, n^n, Exp[n], Log[n], n^100, 10^n}, {n, 0, 2},   PlotLegends
 -> "Expressions"]

If am wondering whether there is a way to differentiate the different curves by clicking on the equation and highlighting the respective curve?

thanks

$\endgroup$
1
4
$\begingroup$

Try this:

Plot[Tooltip[{n!, n^n, Exp[n], Log[n], n^100, 10^n}], {n, 0, 2}]

Now when you hover over the plot, the tooltip (the little popup window) tells which curve the mouse is pointing at.

$\endgroup$
3
$\begingroup$

You can also specify your own plot styles and for functions with large ranges consider LogPlot, e.g.

LogPlot[{n!, n^n, Exp[n], Log[n], n^100, 10^n}, {n, 0, 2}, 
 PlotStyle -> {{Red, Dashing[{0.03, 0.03}]}, Green, Blue, 
   Orange, {Purple, Dashing[{0.03, 0.03}]}, Black}, 
 PlotLegends -> "Expressions"]

enter image description here

$\endgroup$

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .