Plot2d bugs 694770 and 710677



>>>>> "James" == James Amundson <amundson@fnal.gov> writes:

    James> I haven't thought about this problem hard, but it seems to me that the
    James> first derivative isn't even the right thing to consider -- after all, we
    James> plot in straight line segments. The second derivative seems like a more
    James> relevant quantity.

Well, looking at whether the slope changed too much is roughly the
same as looking at the second derivative.

I may try this approach and see how it works.

I think adding at plot_adaptive option would also be good.  At least
we won't waste time plotting lots of unwanted points where the user
has a clue.

    James> I think you are asking the right question. When the dumb approach fails,
    James> it is obvious why and obvious what to do to fix it. Being smart about
    James> plotting is only useful if we are smart enough about it. I am not yet
    James> convinced that we are. What happens if you plot sin(1/x) near x=0?

Heh!  That was exactly the function I used when trying out some of the
adaptive plotting changes.  In any case, I don't think we can ever be
smart enough to plot this carefully because we can't if the interval
truly contains 0.

And plotting implicitly starts from a fixed number of samples, so we
could potentially miss poles if the pole is narrow enough and the
sampling coarse enough.  Don't think we could ever be smart enough to
find a pole like that.

Ray