exchanges x-axis for y-axis
the first version of function which creates heat map
minor changes; check of given x and y values