Added legend, fixed automatic y bounds