changed plotobject def as per @mattpap suggestion