adaptive sampling of an interval or plane
We would like to add function plotting to mpl, but to do this right we need to be able to adaptively sample a function evaluated over an interval so that some tolerance condition is satisfied, perhaps with both a relative and absolute error tolerance condition. I am a bit out of my area of competency here, eg I do not know exactly how the tolerance condition should be specified, but I suspect some of you here may be experts on this. Does anyone have some code compatible with the BSD license, preferably based on numpy but we would consider an extension code or scipy solution, for doing this? The functionality we have in mind is provided in matlab with fplot http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel... We would like 1D and 2D versions of this ideally. If anyone has some suggestions, let me know. Thanks, JDH
On Wed, Aug 12, 2009 at 4:28 AM, John Hunter<jdh2358@gmail.com> wrote:
We would like to add function plotting to mpl, but to do this right we need to be able to adaptively sample a function evaluated over an interval so that some tolerance condition is satisfied, perhaps with both a relative and absolute error tolerance condition. I am a bit out of my area of competency here, eg I do not know exactly how the tolerance condition should be specified, but I suspect some of you here may be experts on this. Does anyone have some code compatible with the BSD license, preferably based on numpy but we would consider an extension code or scipy solution, for doing this?
The functionality we have in mind is provided in matlab with fplot
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel...
We would like 1D and 2D versions of this ideally. If anyone has some suggestions, let me know.
In a past life I wrote code to do this in d=1..6, with lots of other bells and whistles. I'm no longer actively involved with the project, but a colleague has recently updated it with an eye towards releasing it, and right now I'm the bottleneck (time) to review the changes. I just checked out the updated version of the code and it looks a fair bit simpler than my original machinery, which had accreted lots of Fortran dependencies for historical but otherwise uninteresting reasons. How about we have a look at this next week at the conference? I'll ping my colleague in the meantime to check on this... Cheers, f
We should also talk to Ondrej about this at SciPy. Both sympy (through mpmath) and mpmath have matplotlib based function plotting. I don't think it is adaptive, but I know mpmath can handle singularities. Also, Ondrej is doing doing his graduate with with a group that does adaptive finite elements, so he would also be familiar with such algorithms. I am sure that sympy and mpmath (Sage too as well) would be some of the main users of function plotting and would love to see this happen. Cheers, Brian On Wed, Aug 12, 2009 at 4:28 AM, John Hunter <jdh2358@gmail.com> wrote:
We would like to add function plotting to mpl, but to do this right we need to be able to adaptively sample a function evaluated over an interval so that some tolerance condition is satisfied, perhaps with both a relative and absolute error tolerance condition. I am a bit out of my area of competency here, eg I do not know exactly how the tolerance condition should be specified, but I suspect some of you here may be experts on this. Does anyone have some code compatible with the BSD license, preferably based on numpy but we would consider an extension code or scipy solution, for doing this?
The functionality we have in mind is provided in matlab with fplot
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel...
We would like 1D and 2D versions of this ideally. If anyone has some suggestions, let me know.
Thanks, JDH _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Wed, Aug 12, 2009 at 6:28 AM, John Hunter<jdh2358@gmail.com> wrote:
We would like to add function plotting to mpl, but to do this right we need to be able to adaptively sample a function evaluated over an interval so that some tolerance condition is satisfied, perhaps with both a relative and absolute error tolerance condition. I am a bit out of my area of competency here, eg I do not know exactly how the tolerance condition should be specified, but I suspect some of you here may be experts on this. Does anyone have some code compatible with the BSD license, preferably based on numpy but we would consider an extension code or scipy solution, for doing this?
The functionality we have in mind is provided in matlab with fplot
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel...
We would like 1D and 2D versions of this ideally. If anyone has some suggestions, let me know.
Denis Bzowy has replied to me off list with some code adaptive spline approximation code he is working on. He has documentation and code for the 1D case, and is preparing for the 2D case, and is seeking feedback. He's having trouble posting to the list, and asked me to forward this, so please make sure his email, included in this post, is in any replies http://drop.io/denis_adaspline1
participants (3)
-
Brian Granger
-
Fernando Perez
-
John Hunter