Use stack for hist plots

Use the newly created stack class for hist().