PyCORN icon indicating copy to clipboard operation
PyCORN copied to clipboard

Extra white space around plot

Open gageoleighton opened this issue 7 years ago • 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

gageoleighton avatar Jul 19 '18 16:07 gageoleighton

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.

pyahmed avatar Oct 30 '18 08:10 pyahmed