@Z3tt Thanks for the help. Can you please now check the code for why legend box is not tightly wrapped around legend keys and text. You can copy code from previous response. Here is data achieved through dput:
structure(list(panelist = c(1L, 1L, 1L, 1L, 1L), sample = c("Russian banana",
"Vermillion", "Atlantic", "POR12PG28-3", "Valery"), Mealy_T = c(0L,
0L, 0L, 1L, 1L), Fluffy_T = c(1L, 0L, 1L, 0L, 0L), Smooth_T = c(0L,
0L, 1L, 0L, 0L), Moist_T = c(0L, 1L, 1L, 1L, 1L), Dense_T = c(0L,
1L, 1L, 1L, 0L), Cookedpotato_A = c(0L, 0L, 0L, 0L, 0L), Cookedpotato_F = c(1L,
0L, 1L, 0L, 0L), Metallic_F = c(0L, 1L, 0L, 1L, 1L), Metallic_A = c(1L,
1L, 0L, 1L, 1L), Rawpotato_A = c(0L, 1L, 0L, 0L, 0L), Rawpotato_F = c(0L,
1L, 0L, 0L, 1L), Earthy_A = c(1L, 1L, 0L, 0L, 0L), Earthy_F = c(1L,
1L, 0L, 0L, 0L), Dry_T = c(1L, 0L, 0L, 0L, 0L)), row.names = c(NA,
5L), class = "data.frame")