changed deprecated min & max to minimum & maximum

Changed a few min/max functions to minimum() and maximum() to prevent huge spam of errors durning plot creation.