Leptonica uses gnuplot to display plots. Download the standard gnuplot Windows version (not the Windows X11 version unless you know what you are doing). Besides installing gnuplot you have to set the following environment variables:
Add c:\gnuplot\bin to your system’s PATH.
Create a new environment variable called GDFONTPATH and set it to c:/windows/fonts
Create a new environment variable called GNUPLOT_FONTPATH and also set it to c:/windows/fonts
After showing a plot, the calling program will pause until both the plot window and gnuplot window are closed.