pyahmed / PyCORN

A script to extract data from ÄKTA/UNICORN result-files (.res)
46 stars 25 forks source link

Extra white space around plot #19

Open gageoleighton opened 6 years ago

gageoleighton commented 6 years ago

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

pyahmed commented 5 years ago

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.