pyahmed/PyCORN

Extra white space around plot

Opened this issue · 1 comments

When generating a figure of certain data using the --xmax function, there is excess white space inserted below the plot. For the data file attached I have found that using --xmax 199 , or anything less, results in excess white space whereas --xmax 200 , or greater, does not.

It also does not appear to be format specific; pdf and png show the same resulting white space.

20180614_MBD2p55BR_N15_Run2_GOL_HiTrapSP_1 001 001.zip

It seems this is cause by this line in pycorn-bin.py:
plt.savefig(plot_file, bbox_inches='tight', dpi=args.dpi)

If changed to:
plt.savefig(plot_file, dpi=args.dpi)

it works.

I'm not a matplotlib expert but I was under assumption "tight" should actually remove excess whitespace.