Add rudimentary ability to pass a number of columns for legends