Your question seems strange for me. Do you want to know how many pixels do you need in a direction to represent 1 kilometer ?
This looks simple mathematics.
For each dimension (x and y), you know the represented distance D (in km), and you know what is the length lp of your window or max axis size (800 or 600…).
So one pixel in that dimension represents D/lp km.
Presumably the graph is linear.
Xkm = (Xpixels-leftedge) * (width in km) /(width in pixels)
same for Y
I think the complication is that there may be “islands” (like the kankar & silt deposit on the right). So if you’re interested in a specific boundary (e.g. clay&kankar/kankar&silt boundary), you can get multiple results.