Contour plots

TeeChart for ActiveX, COM and ASP
Post Reply
Raimund
Newbie
Newbie
Posts: 3
Joined: Mon Jan 10, 2022 12:00 am

Contour plots

Post by Raimund » Thu Feb 17, 2022 1:20 pm

Hello,

I often have to draw contour plots that are not defined over a rectangular area. This results in boundaries within the plotted area beyond which there are no meaningful values of the function to be plotted. In Matlab, this problem is solved by specifying a value "NotANumber". The boundary is then interpolated from point to point without colour shifts:
Matlab Contour Plot.png
Matlab Contour Plot.png (129.26 KiB) Viewed 27227 times
If I try something similar in TeeChart, I can only create such a boundary by restricting the contour levels displayed. However, this results in very unsightly grid jumps at the boundary:
TeeChart Contour Plot.png
TeeChart Contour Plot.png (11.98 KiB) Viewed 27227 times
Is there a possibility in TeeChart to hide areas that are not to be drawn, e.g. with "NotValid" or "NotANumber" or similar? Is it possible to avoid the displayed grid jumps?

Best regards,
Raimund

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Contour plots

Post by Marc » Thu Feb 24, 2022 3:39 pm

Hello Raimund,

TeeChart offers the possibility to plot non-visible points (like a null point) but that's not what you're looking for I think. It would leave holes. The alternative, and it's not part of the Series type at the moment, would be to calculate the interpolation value.

The interim would be to do that manually, a routine that takes data from neighbouring points and decides on a compatible value. We could run a test on that type of code to internalise it. I've logged this as a feature-request, http://bugs.steema.com/show_bug.cgi?id=2511

Regards,
Marc Meumann
Steema Support

Post Reply