Labels on bar plots

These variables are defined way too far up.  It's only used in the inner if block, so it should only be scoped there.