Maximising power received using two sets of data
Using matlab. First, set up value ranges:

distance = 3.2;
powerTransmit = linspace(30,36);
frequency = linspace(862e6,866e6);


'meshgrid' can be used to simplify loops:

[X,Y] = meshgrid(powerTransmit,frequency);
Z = X - 20*log10(Y) - 20*log10(distance);


Since it is not clear how to convert equation results to a percentage, I've used a linear mapping:

Z = (Z-min(min(Z)))*(246-120)/(max(max(Z))-min(min(Z))) + 120;


Now, a contour plot:

contour(X,Y/1e6,Z)
xlabel('powerTransmit [dBm]')
ylabel('frequency [MHz]')
title('powerReceived [%]')
colorbar


Result: