[parton] Fix empty canvas bug.

Histogram went out of scope before plot was printed