0

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

ubpdqn
  • 60,617
  • 3
  • 59
  • 148
kaka
  • 351
  • 2
  • 11

2 Answers2

4

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.

bill s
  • 68,936
  • 4
  • 101
  • 191
3

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

ubpdqn
  • 60,617
  • 3
  • 59
  • 148