added convenience function. expand legend automatically