Please note that the following idea is not an exact solution, but it is worth a try.
The idea is to use the weight parameter w to repeat the corresponding values ββin x and y . Therefore, if you scale w , for example, to the range [1,10] , all corresponding values ββin x and so in y will be duplicated 10 times for w equal to 10. That is, the new x , y . Thus, we consider weight as the frequency of values ββin x and y . Having done this, introducing new algorithms, we hope that you will get the desired results, as shown in the examples below.
- For the first figure, the blue-red spectrum corresponds to lower-up weights. Numbers are names duplicating factor as described above.
- For the second picture, your data, we did not touch the color format.


source share