def spaceless_pdf_plot_maker(array, filename, vmax=None, dpi=DEFAULT_DPI):
if vmax is None:<EOL><INDENT>vmax = np.percentile(array, DEFAULT_SATURATION_THRESHOLD)<EOL><DEDENT>plt.gca().set_axis_off()<EOL>plt.subplots_adjust(top=<NUM_LIT:1>, bottom=<NUM_LIT:0>, right=<NUM_LIT:1>, left=<NUM_LIT:0>, hspace=<NUM_LIT:0>, wspace=<NUM_LIT:0>)<EOL>plt.margins(<NUM_LIT:0>, <NUM_LIT:0>)<EOL>plt.gca().xaxis.set_major_locator(plt.NullLocator())<EOL>plt.gca().yaxis.set_major_locator(plt.NullLocator())<EOL>plt.figure()<EOL>if SEABORN:<EOL><INDENT>sns.heatmap(array, vmax=vmax, cmap="<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>plt.imshow(array, vmax=vmax, cmap="<STR_LIT>", interpolation="<STR_LIT:none>")<EOL>plt.colorbar()<EOL><DEDENT>plt.savefig(filename, bbox_inches="<STR_LIT>", pad_inches=<NUM_LIT:0.0>, dpi=dpi)<EOL>plt.close()<EOL>
Draw a pretty plot from an array

    A function that performs all the tedious matplotlib
    magic to draw a 2D array with as few parameters and
    as little whitespace as possible.

    Parameters
    ----------
    array : array_like
        The input array to draw.
    filename : file, str or pathlib.Path
        The output image to save the array into.
    vmax : float, optional
        The default saturation threshold for the array. If set to None, the
        80th percentile value of the array is chosen. Default is None.
    dpi : int, optional
        Dots per inch (DPI) of the output image. Default is 200.