Fix padding of legend when x axis hidden - #582