There is also set key opaque (see also https://superuser.com/questions/1551391 and Set custom background color for key in Gnuplot).