draws legend box for variables and parameters