updated for diagrmas 1.2, use gradient for color bar