Improve plotting API