Am 07.11.2017 um 12:50 schrieb Michael Van Canneyt via Lazarus:
I see that I missed to commit a patch to plotpanel, because here
sin(x) works. I have too many unfinished patches in my source tree :/
Should I still commit it, or it is not necessary any more ?
Please commit it. I think we should fix the shortcomings of plotpanel.
There were already a few bugs which I fixed - look at the svn commit
notes. I'm just against adding too many new features which just will be
appetizers for even more new features.
In the meantime I put the TExpressionSeries into the standard TAChart
package where everything works fine (in order to remove the dependence
on fpexprparser, maybe I'll move it to a separate package later once I
know how to get the registration for the series editor done). Here are
short instruction how to use it
* Add a TChart on the form
* Double-click the chart
* In the "Edit series" dialog select "+ Add" and "Math expression
series" at the very bottom.
* In the Object Tree, select the newly added serie,
Chart1ExpressionSeries1
* Enter the function term, e.g. 'sin(x)*exp(-0.1x)'
* Define the x range for which the function will be plotted: Select
"Range", enter the minimum and maximum x values, e.g. XMin = 0, XMax
= 50, set UseXMin and UseMax to true in order to apply this axis range.
* Set AutoExtentY to true in order to auto-scale the y axis.
* Voila - see the attached screenshot (which is taken at designtime,
of course).
Michael, the expression panel allows to add identifiers at designtime. I
do understand this for variables, and, in fact, this is great to
parameterize the function or to use natural constants. But the
IdentifierType can also be itFunctionCallBack, itFunctionHandler,
itFunctionNode. Can you explain how these should be handled in practice?
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus