Help needed in creating heatmap

Hi there
I am new to Processing. I am trying to create a heat map using arduino and processing via serial communication. Arduino sending data in csv format
Xaxis, Yaxis, Sensor.
Xaxis, Yaxis, Sensor.
Xaxis, Yaxis, Sensor.
This is what I am doing at serialEvent

void serialEvent(Serial port)
{
data = port.readStringUntil(’.’);
data = data.substring(0, data.length() - 1);
index = data.indexOf(",");
xAxis = data.substring(0, index);
index2 = data.indexOf(",");
yAxis = data.substring (index+1 , index2);
sensor = data.substring (index+2 , data.length());
Something wrong there as I am not able to split string into variables properly.
I want to plot that in 2d heat image. I want to fill each pixel or rectangular blob with corresponding xy, with sensor data and it create heat map. I tried to plot but didn’t succeed. I want to hold pixels values in image until sensor update them. Any help with code will be appreciated. Thanks in advance.

You need to format your code. Edit your post. Highlight your code and press the icon </>.

Check these posts:

How to create a heatmap from list of X Y Points - Processing 2.x and 3.x Forum
Heat Map Color Resolution - Processing 2.x and 3.x Forum

I also recommend you post an mcve.

Kf