how to make a subplot work