types: If types=NULL then the names of the cells will be grouped automatically. Default is NULL
legloc: A keyword from the list "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". Default is "bottomright"