plots data from the API