fix small bug in example and fix bug in script template for barGap and linewidth