def draw_sparse_matrix(
    array_filename,
    output_image,
    vmax=DEFAULT_SATURATION_THRESHOLD,
    max_size_matrix=DEFAULT_MAX_SIZE_MATRIX,
):
    """Draw a quick preview of a sparse matrix with automated
    binning and normalization.
    """

    matrix = np.loadtxt(array_filename, dtype=np.int32, skiprows=1)
    try:
        row, col, data = matrix.T
    except ValueError:
        row, col, data = matrix
    size = max(np.amax(row), np.amax(col)) + 1
    S = sparse.coo_matrix((data, (row, col)), shape=(size, size))
    if max_size_matrix <= 0:
        binning = 1
    else:
        binning = (size // max_size_matrix) + 1
    binned_S = hcs.bin_sparse(S, subsampling_factor=binning)
    dense_S = binned_S.todense()
    dense_S = dense_S + dense_S.T - np.diag(np.diag(dense_S))
    normed_S = hcs.normalize_dense(dense_S)
    spaceless_pdf_plot_maker(normed_S, output_image, vmax=vmax)
Draw a quick preview of a sparse matrix with automated
    binning and normalization.