|
Contour chart with binning |
Posted by Sebastian on Oct-30-2024 19:35 |
|
Hello everyone,
I got asked to create a chart showing a huge number of noisy data comprising of z-values at XY-coordinates.
In my case contour chart seems to be the chart type of choice regarding the intended look. Unfortunately, there are some many data that I do not need the contour plot to interpolate values but to think about statistical preprocessing in order to get a proper result. The intention of the chart is to get a first impression of the z-values (color coded) as a function of x and y although there is a lot of noise in the z-value.
I know some chart types like binned scatter plots from other libraries, e.g. R. An example is shown here:
https://r-graph-gallery.com/100-high-density-scatterplot-with-binning.html
Here, the z-value (color) of a certain bin is calculated internally according to a specified function: count, mean, ...
Is there an easy implementation for that using ChartDirector or do I have to calulate the bins, the value and everything else in advance by myself?
Kind regards,
Sebastian |
Re: Contour chart with binning |
Posted by Peter Kwan on Oct-30-2024 23:17 |
|
Hi Sebastian,
Although ChartDirector has no built-in binning function, I believe it is easy to write the binning code for rectangular grids (instead of hexagonal grids). The chart will then look it a discrete heat map.
It may take less than 10 lines of code for the binning depending on the programming language. If you can inform me of your programming language and framework (such as C#/WPF, C++/MFC, PHP, ...), I can try to develop an example using random data.
Best Regards
Peter Kwan |
Re: Contour chart with binning |
Posted by Sebastian on Oct-30-2024 23:23 |
|
Hi Peter,
thank you for your instant reply. The code arround my request in written in C#.
Best regards
Sebastian |
|