added option to paint bars instead of lines or points