On Tue, Jul 26, 2022 at 2:10 PM Alan
On Thu, 21 Jul 2022 17:56:45 -0400 John Kitzmiller
wrote: (Apologies for double-dipping, but usage direction for the least-squares fit extension in m-graph would be a gift.)
The least-squares fit (to a polynomial) is a deterministic calculation, not an arbitrary non-linear search. As such, it is very robust.
Certain (useful) functions, a Gaussian peak for example, can be suitably transformed to a polynomial function, so these are handled as well, robustly.
Examples are given as comments in mp-grap.mpiv that you can follow. Also attached is an adapted version of the original John Hobby documentation, with extensions described.
Note that the m-graph module is simply a re-write of the John Hobby graph macros, taking advantage of floating-point MetaPost (thus simplified).
%%%%%%%%%%%%%%%%%%%%%%%%
I have been working on a completely new luagraph module that does much in lua. It has, notably, arbitrary coordinate systems.
This has been a moving target as I put more and more into lua and less and less in Metapost. I have also been playing chase with the development of luametatex (and have fallen behind).
Alan
Thanks for the modified documentation of the graph macros. It has been a great help. Is it in the lmtx distribution somewhere? I read about the upcoming luagraph in mag-1104-mkiv.pdf (This Way 11/11/2019) and have also played a bit with LuaMetaFun and Aditya's blog post. Looking forward to that development, thank you! John