MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Routines inside Epilog


Hi, 
 
I need to plot many lines between a curve and the x-axis for to show an
 approximation of the area under the curve. 
 
Example:  
f[x_] := 36 - 4*(x - 3)^2

Plot[f[x], {x, 0, 3}]

Plot[f[x], {x, 0, 3}, Epilog -> {Line[{ {0.2, 0}, {0.2, f[0.2]}, {0.4, 
f[0.2]} }], Line[{ {0.4, 0},{0.4, f[0.4]},{0.6, f[0.4]}}]]

All the above-mentioned works correctly. However, I am not able to 
create a routine for several similar lines, as:

 Plot[f[x], {x, 0, 3}, Epilog -> Do[Line[{ {i, 0}, {i, f[i]}, {i+.2, 
f[i]} }],{i,15} ]]

Where is my error?   
   
Thank you very much.

GERMAN BUITRAGO


  • Prev by Date: RE: Re: Solving simultaneous eqns
  • Next by Date: Recommended books for Mathematica
  • Previous by thread: Re: Scale on axis in ListPlot3D?
  • Next by thread: Re: Routines inside Epilog