Although LNA version 1.60 is very fresh, I'm currently working on the next version. The first thing that has been implemented already is to convert all optional arguments from "positional" to "named" arguments. This adds a lot of flexibility. For example, assume that you have to plot a function
f(x) using the LNAplot function
PlotFunc. You want to plot the function with a line 2-pixels thick, and with tic labels placed near the corresponding tic. In version 1.60, you should write something like this
PlotFunc(f, {-1,2}, {-2,4}, true, 2, "auto", true, 1)
The first 3 arguments (
f,
{-1,2}, and
{-2,4}) are mandatory. The rest are optional. Among the optional arguments, you really need the second (
2), and the last (
1). The rest of the optional arguments are not really needed, but you must provide them, because CPLua's system of optional arguments is positional. For example, the last argument corresponds to label position, and it is set to 1. You must enter the first 4 optional arguments, even if you don't need them. In the next LNA version, the above command will be written as
PlotFunc(f, {-1,2}, {-2,4}, {lwidth=2, lblpos=1})
Here, only the optional arguments you want to modify are present:
lwidth (line width) and
lblpos (label position). I think that this is much more easier than current syntax. Note that optional arguments are now named and should be enclosed in brackets.
The new syntax permits to add even more optional arguments without making things more complex. Such a thing is more or less mandatory, since
PlotFunc, for example, has already 8 optional arguments, and I'm planning to add more in the near future (the new optional arguments will add more capabilities). Doing so, and keeping the current syntax is not a good idea.
However, the new syntax has a drawback: you will need to modify all your programs, so that optional arguments will be enclosed in brackets, and they should be named. Note that this affects
all LNA functions with optional arguments (not only plotting functions).
If you think that you need the new syntax now, let me know. I can release version 1.61 for this.