Lazarus

Programming => Graphics and Multimedia => TAChart => Topic started by: apeoperaio on November 03, 2014, 11:23:19 am

Title: contour serie
Post by: apeoperaio on November 03, 2014, 11:23:19 am
Is it possible with TAChart to draw a contour plot?
http://en.wikipedia.org/wiki/Contour_line
Thanks,
Andrea
Title: Re: contour serie
Post by: jwdietrich on November 03, 2014, 11:33:31 am
Depending on your requirements, a ColorMap might be sufficient for your application, see http://wiki.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming (http://wiki.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming) for details. However, a ColorMap isn't the same as a contour plot.

You might therefore consider to define a function series linked to a TParametricCurveSeries handler. With this technique it should be possible to implement a real contour plot. A possible result is the third example at http://wiki.freepascal.org/TAChart_Demos#func (http://wiki.freepascal.org/TAChart_Demos#func).
Title: Re: contour serie
Post by: wp on November 03, 2014, 01:55:23 pm
Look at this old thread: http://forum.lazarus.freepascal.org/index.php/topic,19399.msg114039.html. It contains a "contour finder" class plus example for TAChart.
Title: Re: contour serie
Post by: apeoperaio on November 05, 2014, 12:17:33 pm
I had look at the thread, is it implemented in tachart? Since I didn't find ant contour unit in the tachart package.
Title: Re: contour serie
Post by: wp on November 05, 2014, 01:00:27 pm
You are right, TAChart does not contain any contour units. But the attachment in one of the postings of the thread contains a complete demo project which shows how you can extend TAChart to draw contours.
TinyPortal © 2005-2018