We know about the existence of dark matter only from its gravitational interaction. In fact dark matter was devised to explain abnormal rotation curves of galaxies which required extra matter to explain the rotation profile.
As far the as the image which you have shown,the mass distribution is determined
by measurement of gravitation lensing.Gravitational lensing is a general relativistic phenomenon which causes light from distant galaxies to bend due to matter in the foreground.This effect for an observer manifests itself in form
of rings or multiple images of the lenses objects.
For example,here is an image from Hubble of the Abel cluster of galaxies
If you observe carefully, one can see streaks of light/arcs which are actually
lensed images of the background galaxies.General relativity gives a measure of
the mass of the lens(the foreground objects) from the radius of curvature
of the arcs in the image.
We can compare this mass to the images we would expect arising from the distribution of the galaxies we see in the image.As it turns out,the luminous mass(the mass in the galaxies that we see) is not sufficient to explain
the lensed images.This unknown mass is then attributed as being dark matter.
One can continue this process to obtain the amount of dark matter present everywhere to obtain the image you have provided.