Secant and Curve


1 comment

  • Support Admin

    You can draw the curve on the xyPlot by calculating the values of the curve over a range, and adding each value to your series. For example:

    for x = -5, 5, 0.1 do
    y = -0.25*(x+2)*(x+1)*(x-1)*(x-3)

    <xyPlot name="myPlot">
    <axis dim="x" auto="fixed" min="-5" max="5" />
    <series name="curve" />
    <series name="secLine" capacity="2" />

    This plots the example function over the range of -5 to 5.

    You can then draw the secant line by adding two points along the curve to a different series. 


    Comment actions Permalink

Please sign in to leave a comment.