PixelHeatMap with different grid spacing

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

PixelHeatMap with different grid spacing

Post by Felix » Fri Apr 04, 2014 8:39 am

Hello

is it possible to PixelHeatmap with different grid spacings, the individual values ​​to be depicted?
It should be a mixture of Animated intensity mesh and Heat map.

How can I transpose such a thing?

lg
Felix

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: PixelHeatMap with different grid spacing

Post by ArctionPasi » Fri Apr 04, 2014 5:08 pm

That can be done with IntensityMeshSeries. There's no PixelRendering property in mesh (IntensityGridSeries has it). With mesh you can change the rows and column spacings. If you want it to look like pixels (solid color rectangles), you'll have to add more points. We have pretty much equivalent example "Stepping Surface Mesh" made with SurfaceMeshSeries3D.
Stepping surface heatmap 3D chart
Stepping surface heatmap 3D chart
steppingSurfaceMesh3D.jpg (278.43 KiB) Viewed 10602 times
When viewing it from top, it looks like a heatmap constructing of pixels:
Orthogonal top view
Orthogonal top view
ortho_top_view.jpg (177.47 KiB) Viewed 10602 times
Same principle can be used for 2D intensity plots as well. And columns and rows don't have to be of equal width or height.
LightningChart Support Team, PT

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Re: PixelHeatMap with different grid spacing

Post by Felix » Tue Apr 08, 2014 11:33 am

Hello Pasi,

I tried it with your example. But I have the following problem.
To fill the chart, I need to create a 2 Dimensional Array (Surface Point [X, X]). How can I create and scale the array right, if I do not have a fixed grid spacing?
I can not fill the chart so as a "Free Form Point Line Series".
However, it should be seen in the chart still a form.

point details:

Name Value X Y
Point 1 346 -0,021 -0,026
Point 2 302 0,995 -0,018
Point 3 304 1,994 -0,033
Point 4 316 2,993 -0,059
Point 5 311 3,993 -0,115
Point 6 323 4,989 -0,222
Point 7 190 5,967 -0,405
Point 8 164 6,925 -0,692
Point 9 273 7,848 -1,073
Point 10 346 8,727 -1,549
Point 11 454 9,562 -2,099
Point 12 454 10,346 -2,722
Point 13 375 9,575 -2,589
Point 14 485 8,708 -2,098
Point 15 323 7,803 -1,687
Point 16 458 6,856 -1,370
Point 17 499 5,879 -1,162
Point 18 458 4,886 -1,050
Point 19 360 3,887 -1,006
Point 20 494 2,885 -1,027
Point 21 450 1,886 -1,090
Points to be displayed
Points to be displayed
Chart Points.PNG (20.04 KiB) Viewed 10539 times
Representation in the PixelMap
Attachments
Representation in the PixelMap
Representation in the PixelMap
Chart Points PixelMap.PNG (18.7 KiB) Viewed 10539 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: PixelHeatMap with different grid spacing

Post by ArctionPasi » Tue Apr 08, 2014 12:01 pm

I'm sorry I don't understand what you are trying to achieve. Can you please use MS Paint or something and sketch a picture of what it should look like :?:
LightningChart Support Team, PT

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Re: PixelHeatMap with different grid spacing

Post by Felix » Tue Apr 08, 2014 1:49 pm

If I fill the chart I create a Surface Point [ x , x] array.
To fill this, I iterate through my points and sort the two axes X, Z in ascending order.
After this I calculate my minimum distance between points X , Z, to set the grid width.
Now I create a new array with the same grid spacing, missing fields are added empty.

Now I refill the Surface Points like a chess board with figures, point 1 on [0,1].Y = Value, point 2 on [10,5].Y = Value...
chess board
chess board
Array.PNG (77.04 KiB) Viewed 10536 times
Since the grid spacing is the same, I can very easily calculate the scaling.

How can I fill the chart , if every point has a different distance?
The checkerboard filling no longer works, because each point has a different grid spacing.
This is the result when I fill the points with my existing method. Display PixelMap
This is the result when I fill the points with my existing method. Display PixelMap
Chart Points PixelMap.PNG (18.03 KiB) Viewed 10536 times
How do I now add the following points ?
Point2 X = 0.995 , Z = -0.018 , Y = 302
Punkt15 X = 7.803 , Z = -1.687 , Y = 323
...

The whole should then look something like this.
The whole should then look something like this.
The whole should then look something like this.
Chart Result.PNG (19.62 KiB) Viewed 10536 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: PixelHeatMap with different grid spacing

Post by ArctionPasi » Tue Apr 08, 2014 2:14 pm

How about using a PolygonSeries to render a box for each data point, and getting the polygon's fill color like this:
IntensitySeries.ValueRangePalette.GetColorByValue(value). Then you have total control of the size and the shape of the area for each data point, and color encoding by a value-range palette.
LightningChart Support Team, PT

Post Reply