adds legends to studies