metaseq.plotutils.prepare_logged¶
-
metaseq.plotutils.
prepare_logged
(x, y)[source]¶ Transform x and y to a log scale while dealing with zeros.
This function scales x and y such that the points that are zero in one array are set to the min of the other array.
When plotting expression data, frequently one sample will have reads in a particular feature but the other sample will not. Expression data also tends to look better on a log scale, but log(0) is undefined and therefore cannot be shown on a plot. This function allows these points to be shown, piled up along one side of the plot.
Parameters: x,y – NumPy arrays