Page 1 of 1

Contour plots

Posted: Thu Feb 17, 2022 1:20 pm
by 16692732
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 30523 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 30523 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

Re: Contour plots

Posted: Thu Feb 24, 2022 3:39 pm
by Marc
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