Trying to pass an object to the plots