def distort_matrix_Y(Z, Y, f, new_ymin, new_ymax, subsample=<NUM_LIT:3>):
<EOL>new_Z, new_Y = distort_matrix_X(Z.transpose(), Y, f, new_ymin, new_ymax, subsample)<EOL>return new_Z.transpose(), new_Y<EOL>
Applies a distortion (remapping) to the matrix Z (and y-values Y) using function f.
returns new_Z, new_Y

f is a function old_y(new_y)

Z is a matrix. Y is an array where Y[n] is the y-value associated with the array Z[:,n].

new_ymin, new_ymax is the range of the distorted x-variable for generating Z

points is how many elements the stretched Z should have. "auto" means use the same number of bins