Store data in plot object as a promise (via a function).
Fixes slow return of control in case of error.