updated plotpatientmeans to include all types of output figures